I have a Postfix server that I am using as an outbound SMTP gateway for a mail server. The postfix server has a name such as smtp.domain1.com.
Now, I have users on my mail server that are trying to send messages to poorly formatted addresses, such as to user@domin. My postfix server is rewriting the address as [email protected].
How can I configure postfix to not rewrite the address and bounce the message if the address is not complete? I believe this can be done with the append_at_myorigin paramter, but the Postifx documentation says that this feature must not be turned off.
If you really want to stop postfix from rewriting addresses on any "local" mail, use
"local" in this context means mail sent from the machine itself, and any clients that connect from IP addresses in "$mynetworks", which would likely be the case if this is an internal->external SMTP gateway.
The default setting is
which causes postfix to rewrite addresses for mail when the client IP matches $inet_interfaces.
There are a bunch of other options to this parameter, which might allow you to be a bit more specific, cf. local_header_rewrite_clients docs on the postfix website
I'm putting this because it could save someone a few hours of messing around.
Also check that postfix is actually receiving the correct FROM header in the first place. I use ssmtp to send mails throgh postfix and it was actually ssmtp which was overriding the FROM header. I needed to set
in the ssmtp.conf file to stop it overriding the from address.