michael.osi...@siemens.com:
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?

On 11.02.22 09:38, Wietse Venema wrote:
We can do soething similar in Postfix:

/etc/postfix/main.cf:
  sender_canonical_maps = inline:{{@localhost = @$myhostname}}

wouldn't sigle brackets {} be sufficient here?

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.

excuse me, how does this work related to *_recipient_maps?

Thank you
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
If Barbie is so popular, why do you have to buy her friends?

Reply via email to