Le 29/12/2010 21:33, Phil Howard a écrit :
> On Wed, Dec 29, 2010 at 12:38, Noel Jones <njo...@megan.vbhcs.org> wrote:
> 
>> In postfix, you can use a header_checks IGNORE rule to remove unwanted
>> headers.  Be careful that your rule only matches the exact header you want
>> to remove.
> 
> As I understand header_checks, it removes only what is already in the
> message.  When my "[127.0.0.1]:10025 inet n - n - - smtpd" (from
> master.cf) instance gets a message from amavis, it inserts its own new
> Received: header that I don't want.  How could header_checks remove
> that and not remove the one that was insert when the public facing
> smtpd got the mail (that one I want to keep).

no, it will also remove the header that postfix itself adds. check the
headers of _this_ message.

> 
> 
>> Or just ignore the extra headers, that's what most everyone else does.
> 
> I was trying to.  It turns out to not be trivial.  If I could find an
> easier way to just not have them inserted at all, that would be
> better.  Otherwise I will have to do some C code to properly select
> the desired headers.  If I can stop amavis and the 2nd smtpd from
> inserting more, then it's easy to just look at the first Received
> header.  The difficulty is because at a point after mail has already
> been delivered (Dovecot deliver will have already delivered
> somewhere), I'm looking for strings in the headers that the headers
> from amavis and the 2nd smtpd will be false positive matches on.
> 


Reply via email to