On Mon, Jan 16, 2017 at 09:36:10AM -0500, aretes27...@mypacks.net wrote: > 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"? >
Yes, keep reading this mail and find your error at the bottom of it. > 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. > This probably means a configuration issue but you didn't provide enough log context to figure it out. I'll take a wild guess: You're connecting over SMTP and the ruleset considers your client as a non-local one which ... > 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 > ... is not allowed to relay based on this configuration ... > # relay > > relay as "@my-domain.com" > ... and this is where you get your syntax error, "relay as" is parameter to accept, it should read: accept [...] relay as [...] -- Gilles Chehade https://www.poolp.org @poolpOrg