On Fri, May 17, 2024 at 08:12:27AM +0200, fr...@lilo.org wrote:
How to forward outgoing mail to a remote SMTP server with smtpd?
I found this page, but it's out of date I think.
https://romanzolotarev.com/openbsd/smtpd-forward.html
Tks
Pascal
I have mine setup like this and its working.
My /etc/mail/smtpd.conf:
--- start file ---
# $OpenBSD: smtpd.conf,v 1.14 2019/11/26 20:14:38 gilles Exp $
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
table aliases file:/etc/mail/aliases
listen on socket
# To accept external mail, replace with: listen on all
listen on all
action "local_mail" mbox alias <aliases>
action "outbound" relay host smtp://<upstream port 25 mail server>"
# Uncomment the following to accept external mail for domain match from
# any
for domain "<my FQDN mail domain>" action "local_mail"
match from local for local action "local_mail"
match from local for any action "outbound"
--- End file ---
# doas rcctl enable smtpd
# doas rcctl start smtpd