Good point, although this should work in most cases.
How about this: any part of the from matches any line in the file. So,
from your example below, media.bbc.co.uk could go to the Media folder
(because it matches the line "media" in the file.)
Do you know the proper form of the *OR* in the grep?
* ? $GREP -i ^($FROM|$DOMAIN) $TRAVEL
Thanks, Bill
-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE] On Behalf Of
Ruud H.G.
van Tol
Sent: Wednesday, November 28, 2007 12:12 PM
To: [procmail]
Subject: Re: Grep from file
Bill McCormick schreef:
find the domain.com part of the $FROM
What do you define as the "domain.com" part?
media.bbc.co.uk
support.asus.com.tw
From Sean's code:
:0 h
CLEANFROM=|formail -IReply-To: -rtzxTo:
# user
:0
* CLEANFROM ?? ^\/[^(_at_)]+
{ FROM_USER=$MATCH }
# domain.tld
:0
* CLEANFROM ?? @\/.*
{ FROM_DOMAIN = $MATCH }
--
Groet, Ruud
____________________________________________________________
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
____________________________________________________________
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