[exim] Regex Matching In ACL

Top Page
Delete this message
Reply to this message
Author: Pete Long
Date:  
To: exim-users
Subject: [exim] Regex Matching In ACL
Hello,

I wonder if anyone can point me in the right direction regarding how to
match a subject line using 'if match'.

Here is my ACL, set to 'warn' for the time being until I understand
where I'm going wrong.


warn
       condition = ${if match{$h_subject:}{^tester.*}{yes}{no}}
       add_header = X-Test: Matched something.
       log_message = Matched something.



The only time I can get a match is if I use {.*} as the regex which
appears to match everything. My ultimate goal is to match two names
commonly used in the subject lines of a particular spammer and to reject
at SMTP time also showing the winning match string somewhere in the
headers/logs.

I've read that 'if match' conditions don't need to be encased in \N \N
but even when I do I never get a match.

Here's what I would ideally like to use as a regex:

{(i?)*.spammer.person\$}

Right now, to me that means a match for 'hi i'm spammer person' or 'Hi I
am Spammer pErson' but I guess I'm way wrong.

Any help would be greatly appreciated.


Regards,

Pete.