procmail
[Top] [All Lists]

Re: filtering mail for recipients only within certain domains

1999-09-25 15:39:21
You're correct. MATCH is only getting assigned the last header line.

So, is it more efficient to use an includerc (which could, if my reading is
right, execute many, many copies of procmail), or just execute a copy of formail
once to extract the content of certain headers and assign a variable the value
of the concatenated list? That variable could be matched against, with scoring,
to get the right result without recursion.

Philip Guenther wrote:

"Eric C. Hagberg" <hagberg(_at_)ms(_dot_)com> writes:
Saw that before, but also saw an example (similar to mine) which said 'this
doesn't need recursion'... in a faq somewhere.

I ran it through with debugging on and it seems to match addresses in
multiple headers.

I doubt it.  I bet it'll give the wrong result if there is one or more
non-aol/hotmail address in any header matching ^TO_ except the last.
Put "VERBOSE=on" above your recipe, then feed it the following and look
what the log shows.

        To: bob(_at_)some(_dot_)where
        cc: john(_at_)aol(_dot_)com

Your recipe tests whether the last recipient header contains only aol
or hotmail addresses.  That's all.

Philip Guenther

Attachment: hagberg.vcf
Description: Card for Eric C. Hagberg