On Wed, 2006-06-28 at 15:09 +0100, Gareth Hastings wrote:
> Hi,
>
> I have this in my system filters
>
> if $message_headers matches
> "(207.126.144|207.126.145|207.126.146|207.126.147|207.126.148|207.126.14
> 9|207.126.150|207.126.151|207.126.152|207.126.153|207.126.154|207.126.14
> 7)"
> then
>
> and was wondering if I can put the "(207.126......" section into a text
> file?
You really don't want to do this - its doing nothing like what you
think!
You do realise that a message with subject
Subject: Phone me on 01207 1263144
would match....
[Remember . is a wildcard in regular expressions]
Even if you fixed that, you would still find that both 207.126.144.32
and 127.207.126.144 would both match...
Its also pretty bad practice to do spam filtering in a system filter
because you cannot reject at that stage - you either make mail disappear
silently, or you have to generate a bounce (which since it will be aimed
at an innocent third party who has their sender address forged, puts you
in the position of the villan).
I suggest you do this in a content ACL.
And if you want to match an ip address using a regexp try something
closer to
207\.126\.1(?:4[4-9]|5[0-4])\.\d+
ideally with something else round it - like escaped [] to make the match
stronger.
Nigel.
>
> I've tried
>
> If $message_headers matches /etc/exim/test/testfile
> Then
>
> But this doesn't work. Any ideas?
>
>
> Thanks
>
> Gareth
>
>
>
>
--
[ Nigel Metheringham Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]