Thanks Wietse!

it works!


dm


________________________________
 From: Wietse Venema <wie...@porcupine.org>
To: Postfix users <postfix-users@postfix.org> 
Sent: Sunday, March 4, 2012 3:14 PM
Subject: Re: address rewriting
 
dino muzic:
> 2) outside => postfix => inside server
> doesn't, because generic is rewriting user1@mydomain.local back
> to us...@mydomain.com before relaying it to inside server

Postfix uses different SMTP mail delivery agents for inbound mail
and outbound.

If the destination is in relay_domains, Postfix uses the "relay"
service in master.cf. This is what you should use for "inbound"
mail.

If the destination is NOT in relay_domains, Postfix uses the "smtp"
service in master.cf. This is what you should use for "outbound"
mail.

Therefore, you must apply generic mapping ONLY on the "smtp" service,
not on the "relay" service.

/etc/postfix/master.cf:
    smtp      unix  -       -       n       -       -       smtp
    -o smtp_generic_maps=maptype:mapname
    relay     unix  -       -       n       -       -       smtp

    Wietse

Reply via email to