[Exim] System filter regexp problem - bug?

Etusivu
Poista viesti
Vastaa
Lähettäjä: John Horne
Päiväys:  
Vastaanottaja: Exim Users List
Aihe: [Exim] System filter regexp problem - bug?
Hello,

I've been trying to use the following line (it is just one line) in a system
filter, but it fails for some reason:

        if foranyaddress $recipients,$sender_address_domain,$h_Reply-to:
             ($thisaddress matches dhcp\\.plym(outh)?\\.ac\\.uk\$) then


The error I'm getting is:
2002-05-07 13:12:35 1753pb-0000u3-00 Error in system filter file:
unexpected "(" in line 55 of filter file

The above line is line 55 in the filter file.

I've tried this under Exim 4.04 and 3.36, and got the same error. I've tried
putting '\' before the second set of parentheses but it makes no difference.
If I change the filter to say:
       ($thisaddress matches dhcp\\.plymouth\\.ac\\.uk\$) then
then it works fine. So the problem seems to be the regexp conditional
('(outh)?').


If I put the whole regexp in double quotes, and double up the '\', then it
works fine. If I use the '\N' syntax then I get the error message again.

My understanding though is that the quotes are only needed if a space is
included in the regexp. In this instance there is no space.

So, is this a bug or me doing something daft and missing an obvious point?
:-)



Regards,

John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: jhorne@???
PGP key available from public key servers