On Thu, 6 Dec 2007, Michelle Konzack wrote:
How do I get just the part between < and @?
# This code deals with Spammer trick of placing TO address in subject.
# First grab the address without the domain name....
# This relies on Regex's being 'greedy' and trying to match the longest
# string possible, so it is stopped at the first '@' (so this is not
# as useful when a To header has multiple addresses).
:0fw
* ^To:.*([\"\'A-Za-z0-9\_\-]+ )*[^A-Za-z0-9\_\-]*\/[^ \<\(_at_)\>]+
{
VARMATCH=$MATCH
# Check if its to and from the same address on our domain
# This code adds a header for subsequent testing by spamassassin
:0fw
* $^From:(_dot_)*$\VARMATCH\(_at_)hwcn\(_dot_)org
| formail -A"X-Spam-From: RECIPIENT"
# Then check for its presence on the subject line.
# With specific phrases, can be weighted higher in spam checkers.....
:0fw
* $^Subject: (To|For): $\VARMATCH(\(_at_)hwcn(_dot_)org)*[^A-Za-z0-9\_\-]*$
| formail -A"X-Spam-Subject: TOFOR_RECIPIENT"
}
Enjoy.
- Charles
____________________________________________________________
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