[exim] Exim filter / Regexp weirdness

Top Page
Delete this message
Reply to this message
Author: Sander Smeenk
Date:  
To: exim-users
Subject: [exim] Exim filter / Regexp weirdness
Hey,

I receieve some mail from, to and cc'd-to .fi and .se addresses which i
would like to see delivered in a separate mailbox, so i made this
eximfilter:

| if $h_To: matches "@[^@]+\.(fi|se)" or
|    $h_Cc: matches "@[^@]+\.(fi|se)" or
|    $h_From: matches "@[^@]+\.(fi|se)"
| then
|     save Maildir/.vertaa/
|     finish
| endif


But it seems that the literal . in front of fi or se isn't regarded as
literal ., but as match-anything-here. For example, i receive mails like
this:

| From: bla <bla@???>
| To: foo@???, adsense@???


And they end up in the wrong mailbox because the first @ matches the @
in front of 'bar', the [^@]+ matches 'bar.tld, adse', and \.(fi|se)
matches the 'nse' part of 'adsense'. So, how can I force a literal . ?
As writing \. doesn't help and \\. doesn't work either.

I thought Exim used PCRE's :))

Regards,
Sander.
--
| From the FidoNet tagline collection:
| Another great idea from the man who brought you Beer Milkshake
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D