|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Noel Jones (njones
megan.vbhcs.org)
Date: Wed Dec 29 2010 - 14:46:35 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/29/2010 2:33 PM, Phil Howard wrote:
> On Wed, Dec 29, 2010 at 12:38, Noel Jones<njones
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).
Craft a regular expression that matches the header you want to
remove and won't match others.
- a usable quick example, but could be improved:
/^Received: from .*\[127\.0\.0\.1\].*by server.example.com/ IGNORE
>> 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.
>
Sounds as if you need to adjust what you're looking for too.
-- Noel Jones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]