sender_canonical_maps vs. smtpd_proxy_filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sender_canonical_maps vs. smtpd_proxy_filter

Ralf Hildebrandt
I tried using sender_canonical_maps to rewrite sender adresses in
envelope & header.

I have amavisd-new setup as a smtpd_proxy_filter.

I was able to get rewriting to work for the headers by using:
local_header_rewrite_clients = static:all

But that's a bit broad, so I tried:

local_header_rewrite_clients = 141.42.206.36

to allow rewriting from my mailbox server only. But that simply
wouldn't work:

Sep 30 17:00:54 mail-ausfall postfix/cleanup[15363]: 995B73DD09: warning: header Subject: Test mit fake adresse from
postamt.charite.de[141.42.206.36]; from=<[hidden email]> to=<[hidden email]>
proto=ESMTP helo=<postamt.charite.de>

-- it would rewrite the envelope, but not the header.
mail_version = 2.7-20090828-nonprod

--
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  [hidden email] | http://www.charite.de
           
Reply | Threaded
Open this post in threaded view
|

Re: sender_canonical_maps vs. smtpd_proxy_filter

Victor Duchovni
On Wed, Sep 30, 2009 at 05:02:39PM +0200, Ralf Hildebrandt wrote:

> I tried using sender_canonical_maps

[ a cleanup(8) feature ]

> to rewrite sender adresses in envelope & header.
>
> I have amavisd-new setup as a smtpd_proxy_filter.

This happens before cleanup(8).

> I was able to get rewriting to work for the headers by using:
> local_header_rewrite_clients = static:all

This parameter is clearly documented to have the syntax of a restriction
class. (It has "check_address_map" as the implicit restriction for bare
tables).

> But that's a bit broad, so I tried:
>
> local_header_rewrite_clients = 141.42.206.36

This is not a valid restriction class element. Try "permit_inet_interfaces".

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|

Re: sender_canonical_maps vs. smtpd_proxy_filter

Ralf Hildebrandt
* Victor Duchovni <[hidden email]>:

> This parameter is clearly documented to have the syntax of a restriction
> class. (It has "check_address_map" as the implicit restriction for bare
> tables).

Didn't know that. It works now.

--
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  [hidden email] | http://www.charite.de