Dominic Mitchell <dominic(_at_)cedep(_dot_)net> writes:
How can I alter the following rule which works for the body so
that it looks only at the subject line? I have quite many spam
messages that only have these characters in the subject line and
have say an url in the body.
:0BD:
* -1^1 .
* 2^1 =[0-9A-F][0-9A-F]
* 25^1 [\xA0、\x{25c0}ウЖ扤\x{0268}\x{246d}扤渦慨偽係杭纂従\xBF]
* 20^1 [礎津橡麺佰厶孛忤旡毳\xDF]
* 20^1 [痺粤肓跋韵鴦扤扤扤扤\xFF]
* 20^1 =[A-F][0-9A-F]
| $FORMAIL -A "X-Sorted test" >> $DEFAULT
If you want to apply multiple regexps or scoring to a single header
field, then you need to extract the header field into a variable and
match against that:
:0
* ^Subject:\/.*
{
SUB = $MATCH
:0 D:
* SUB ?? -1^1 .
* SUB ?? 2^1 =[0-9A-F][0-9A-F]
* SUB ?? 25^1 [\xA0、\x{25c0}ウЖ扤\x{0268}\x{246d}扤渦慨偽係杭纂従\xBF]
* SUB ?? 20^1 [礎津橡麺佰厶孛忤旡毳\xDF]
* SUB ?? 20^1 [痺粤肓跋韵鴦扤扤扤扤\xFF]
* SUB ?? 20^1 =[A-F][0-9A-F]
| $FORMAIL -A "X-Sorted: test" >> $DEFAULT
}
Doing that for multiple header fields requires either one recipe per
header field, or a recursive INCLUDERC to iterate other the desired
fields.
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail