The "smtpd.conf" man page states:

relay [backup [mx]] [as address] ...
...
If the as parameter is specified, smtpd(8) will rewrite the sender advertised
in the SMTP session. address may be a user, a domain prefixed with ‘@’, or
an email address, causing smtpd(8) to rewrite the user-part, the domain-part,
or the entire address, respectively.
...

I tried this:

relay as "@my-domain.com"

But I get a "syntax error"?

MS Outlook users get "550 Invalid recipient" errors when trying to send mail
outside of our domain. The mail log entries are like:

Jan 16 07:36:28 myserver smtpd[70549]: b76cb7a2aa7f61b8 smtp
event=failed-command command="RCPT TO: <some.b...@somewhere.com>" result="550
Invalid recipient"

Using the command "mail" to compose a message and send it works.

My "smtp.conf" is:

listen on all
pki mail.example.com certificate "/etc/ssl/my-domain.com.crt"
pki mail.example.com key         "/etc/ssl/my-domain.com.key"

table aliases file:/etc/mail/aliases

accept from any for domain "my-domain.com" alias <aliases> deliver to mbox
accept for local alias <aliases> deliver to mbox
accept from local for any relay

# relay

relay as "@my-domain.com"

Reply via email to