procmail
[Top] [All Lists]

Re: Recipe Help.

2003-12-06 12:28:37
At 12:19 2003-12-06 +0000, Alan Clifford wrote:
Have a look at man formail.

FIRSTRECEIVED='formail -U received:'

would put it into a variable.  Then you could search the variable.

Nope, that'd remove the other occurrences of the header from the message, and put the WHOLE MESSAGE into the variable.

Nextly, I doubt it is desireable to use the ORIGIN header of the message (joe schmuck who sent the message from his dsl home box to his ISP mail server), but rather the FINAL header (which is the topmost, identifying the message transaction that put it into your hands). So -u is necessary.

LASTECEIVED=`formail -u Received: -x Received:

(or use -X if you want the header name retained)

* FIRSTRECEIVED  ?? dsl

That's also WAY too broad of an expression which will catch dsl anywhere within the header (or as you extracted it, in the message <g>).

* LASTRECEIVED ?? ^ from .?dsl

I'm not in agreement about the text match though. Also, if the message arrives through your backup MX, this won't see the DSL origin.


Ever consider using a DNSBL that lists IP address spaces of known consumer dialups and broadband connections?

---
 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(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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