Kurt Hindenburg posted some code that is hard to describe without a sick
pun on his name. Among Dallman Ross's suggested improvements was this
(typo corrected):
SUBJ_ = `formail -zxSubject: | sed 's/[ ]*$//'`
We can go even farther. That assignment can be done within procmail
without the three (formail, sed, and a shell to handle the pipe) outside
processes. The two sets of square brackets each enclose caret, space,
tab, and question-mark construct is there in case the subject has only
one non-whitespace character:
:0
* ^Subject:.*\/[^ ](.*[^ ])?
{ SUBJ_ = $MATCH }
If you're uncomfortable depending on procmail's parsimony to the left of
\/, you can write the condition like this (the first pair of brackets
enclose space and tab):
* ^Subject:[ ]*\/[^ ](.*[^ ])?
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail