michael.osi...@siemens.com: > Hi, > > I am currently migrating from a sendmail-based relay to Postfix 3.6.3. > Sendmail has the feature to automatically rewrite @localhost to > @$myhostname automatically. As far as I have seen Postfix doesn't do > this with trivial-rewrite(8) by default nor is a config option for this. > > What I have come up with is doing in /usr/local/etc/postfix/canonical: > > @localhost @myhostname > > I had to add the actual hostname since @$myhostname is not supported. > My question: Is this the proper way to go with Postfix to mimic sendmail > behavior?
We can do soething similar in Postfix: /etc/postfix/main.cf: sender_canonical_maps = inline:{{@localhost = @$myhostname}} The downside of doing this is that the Postfix SMTP server will accept mail from non-existent@localhost, so if you could make the rule more specific (a collection of 1:1 mappings) then that would help. Wietse