Hi,
maybe this, from postfix doc, will help you: http://www.postfix.org/ADDRESS_REWRITING_README.html#generic Willi Am 07.08.2015 um 13:51 schrieb Vincent Pelletier: > Hello, > > I have a Mailman + postfix setup (old versions: mailman 2.1.11, > postfix 2.5.5), and the mail server of one of subscribers' domain > started rejecting mails when "From" header domain is its own domain > (foo.com MX rejecting incoming @foo.com mails). This of course happens > when a @foo.com member posts to the list: other @foo.com subscribers > never receive his post. > > From my understanding of the "From" header, it is legal for it to have > a domain which is not hosted by sender (ie, the SMTP transaction > initiator). > > So my plan is to change nothing on the Mailman level, but rather add an > exception in our postfix config to mangle "From" header of mails being > sent to that server. > > In my understanding, I need 2 distinct postfix features: > - transport_maps for the "recipient-dependent" aspect > - header_check for the mangling part > > Is my understanding correct so far ? > > Here is how I implemented the above: > > main.cf: > transport_maps = hash:/etc/postfix/transport_map > > transport_map: > foo.com mangle_from: > > master.cf: > mangle_from unix - - - - - smtpd > -o header_checks=pcre:/etc/postfix/mangle_from.pcre > > mangle_from.pcre: > /^From:[[:space:]]+.*@foo.com/ REPLACE From: <nob...@nexedi.com> > > But this fails between transport_map and master.cf: > mail.log: > Aug 7 12:56:46 ns208770 postfix/oqmgr[4535]: 2B67ABF017B: > from=<vinc...@nexedi.com>, size=5497, nrcpt=1 (queue active) > Aug 7 13:01:46 ns208770 postfix/error[22126]: 2B67ABF017B: to=<...@foo.com>, > relay=none, delay=1833, delays=1533/300/0/0.16, dsn=4.3.0, status=deferred > (mail transport unavailable) > > mail.warn: > Aug 7 13:01:46 ns208770 postfix/oqmgr[4535]: warning: unexpected > end-of-input from private/mangle_from socket while reading input attribute > name > Aug 7 13:01:46 ns208770 postfix/oqmgr[4535]: warning: private/mangle_from > socket: malformed response > > What did I do wrong ? > Can I do anything without having to upgrade right now ? > > Regards, >