procmail
[Top] [All Lists]

Re: Filter Oddity

2010-04-12 13:28:49
At 18:12 2010-04-12 +0100, Arthur Dent wrote:

Well to my untrained eye, I can see very little difference here. But
you're right. This one fails to match on the test. What have I missed?

Various snips below to congeal the headers of interest:

>From esc1103287837504_1101248844445_5153(_at_)in(_dot_)constantcontact(_dot_)com Sun Apr 11 09:24:07 2010
Return-Path: 
<esc1103287837504_1101248844445_5153(_at_)in(_dot_)constantcontact(_dot_)com>
From: A Contact <a(_dot_)contact(_at_)b2e-resourcing(_dot_)co(_dot_)uk>
Reply-To: a(_dot_)contact(_at_)b2e-resourcing(_dot_)co(_dot_)uk
Sender: A Contact <a(_dot_)contact(_at_)b2e-resourcing(_dot_)ccsend(_dot_)com>

(note the From: and Reply-To: contain the same address, but the Sender: and From_ both represent different domains entirely)

You're matching using the "From " (note space) in your recipe condition, but the domain you're looking for IS NOT IN THE ENVELOPE - a different domain (and what appears to be an encoded bounce-handler address) is used instead. The domain you're trying to match is found in the From: header.

* ^From: .*(blah)

and

* ^From .*(blah)

differ - the first expects a colon followed by a space, the second only a space (and NO colon).

I suspect you really want to add a colon in your condition, and if that's the case, you can lose the space anyway, because the '.*' bit is going to match it.

* ^From.*(blah)

would match EITHER the From: or From_, and in fact, potentially any number of other headers which start with From (of which I'm unaware of any, but the point is, if there were one, it could - say FromAuthentication: if there were such a header).

I can't say why your MUA would be saving with a rewritten From_ line that subsequently matches though. That's odd - but a prime example of why we avoid using the MUA to save a message to reparse... <g>

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>