procmail
[Top] [All Lists]

Re: matching on bad word list but which word was it ?

2006-08-20 02:23:17
Matthias Haeker wrote:

i have a recipe like
:0
*  (bad1|bad2|bad3|bad4|bad5)
{ BADWORD = $MATCH  }

and i was thinking i can get that way  which  BADWORD  was matched in 
the var BADWORD
 

 From the procmailrc man page:

*MATCH*
This variable is assigned to by procmail whenever it is told to extract 
text from a matching regular expression. It will contain all text 
matching the regular expression past the ‘*\/*’ token.

You will need to add ‘*\/*’ to the beginning of the pattern to have the 
result stored in $MATCH.

-- 
Klaus Johannes Rusch
KlausRusch(_at_)atmedia(_dot_)net
http://www.atmedia.net/KlausRusch/


____________________________________________________________
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