[Exim] filter from list of regex expressions

Góra strony
Delete this message
Reply to this message
Autor: Marc Perkel
Data:  
Dla: exim-users
Temat: [Exim] filter from list of regex expressions
Need a little syntax help. I want to write a filter where I test a string
against a file that contains a lot of regular expressions and returns true if
any match. Something like this:

if "$h_from" matches /etc/exim/blockfrom
then
    do something
endif


Where the /etc/exim/blockfrom file looks like this:

^.*(offer|viagra|million|mailer).*@*
^.*dealmac.com
^.*(daily|dialy|daliy)-?pro
^.*(offrz|offrs|offers|dealz)
^.*list(send|delivery)
^.*casino
^.*opt-?in
^.*opti[0-9]
^.*promotion
^.*[\*\%\!\?]
^.*@.*@
^.*offer.*@
^.*cigarette
^.*marketing
^.*lotto
^.*lycos.co.kr
^.*your-?info
^.*superdeal


What is the systex to get this to work?