On Wed, Jan 26, 2011 at 07:42:47PM +0100, Georg Sch?nweger wrote: > aha, thx for this info! I tried smtp_generic_maps already, the problem > with that is that it overrides envelope AND header addresses. I want to > override only the envelope address (Return-Path). Any other ideas?
If it just for the envelope sender, sender_canonical_maps is not as problematic, since the semantic issues arise when headers are rewritten inconsistently (different rewriting of From:/To:/Cc:/Reply-To:). > Is sender_canonical_maps buggy? should i deactivate it anyway? Not buggy, just difficult to use correctly. > >> i have here postfix 2.6.5 on Ubuntu. Outgouing mails are sent via an > >> external SMTP Server (relayhost..). When i send an email from a local > >> user to a real email address i have in the email header "Return-Path: > >> root@SERVER_NAME". So i can't get back any bouncing or error mails.. I > >> use the server mainly for websites so when i send mails via the > >> webserver then i have the same problem, the envelope sender is > >> "www-data@SERVER_NAME" (i know i could change this via PHP-Mail command > >> but i'm using a CMS and i won't change that..) So i tried to masquerade > >> ONLY the envelope sender address. For this i use Canonical address mapping. > >> /etc/postfix/main.cf: > >> sender_canonical_classes = envelope_sender > >> sender_canonical_maps = hash:/etc/postfix/sender_canonical With appropriate table data, it should be possible to rewrite given envelope senders to given alternative envelope senders. -- Viktor.