On Thu, Oct 18, 2001 at 11:56:00PM -0500, Butch Evans wrote:
True, but "^FROM.*" still matches "^From:.*", but it matches more
than that. Thanks for this, as I missed that.
Yes, now that you mention it, that would also match From_, so it is still
useful in a non-macro sense. (Though there's rarely a reason to attempt to
match on From_ in my experience.)
*
^(Subject:.*(pmtest|cybr)|From:(_dot_)*deliberatus(_at_)my995internet\(_dot_)com)
This was my intent, and I have rewritten my recipe to this format
(it is actually about 40 tests of subject, from and to conditions).
In that case, you might want to put the conditions in a variable earlier on,
then reference that variable in the recipe. Something like:
SUBJECT='pmtest|cybr|etc'
FROM='deliberatus(_at_)my995internet\(_dot_)com|foo(_at_)bar\(_dot_)org|etc'
:0:
* ^\/(Subject:.*($SUBJECT)|FROM.*$FROM)
/some/action
Actually, it was:
* ^\/(Subject.*( ...etc
So you want the header field name in $MATCH as well, not just the contents?
I have now changed my strategy, and I am delivering the mail to a "spam"
folder and setting an extra header called X-match with the value of $MATCH,
so I will be able to tell why it matched in the future.
Always a wise idea to not have any new recipe throw things away until it's
fully debugged. :)
Verbose logging is also quite useful when tweaking any recipe.
With that said, I have it working with the help of the 3 or 4 of you
that sent me advise. Thanks to all of you for your assistance.
You're welcome.
--
Andrew Edelstein - andrew(_at_)pure-chaos(_dot_)com
http://andrew.pure-chaos.com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail