procmail
[Top] [All Lists]

Re: Handling for lines

1998-05-21 06:31:48
dh(_at_)west(_dot_)net writes:
On Wed, 20 May 1998, Eric Hilding wrote:
Although I've implemented many new recipes to better thrash spam,
I'm still having difficulty with the indented "for" <addresshere>
or "for" (addresshere) lines to axe out certain junk.

I think these two condition lines can replace the four in your example.

* ^[^!-~]*((.*[^!-~])?)for )?[^         ]+(_at_)fastmail\(_dot_)com[>)]?;[^;]*$
* ! ^[^!-~]*((.*[^!-~])?for 
)?[<(]?legitaddress(_at_)fastmail\(_dot_)com[>)]?;[^;]*$

They should work on one-line rcvd-fields or the sort with breaks. But the
real problem is they match on any rcvd fields in the header, not just the
topmost field. You might want to just apply that to the topmost field, but
I don't know how to do that strictly within procmail. I use the following

The easiest way to do this is to extract the first Received: line with
the \/ token, and match against it:

        :0
        * ^Received:\/.*
        *   MATCH ?? @fastmail\.com
        * ! MATCH ?? legitaddress(_at_)fastmail\(_dot_)com



Philip Guenther

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