[sclug] milter-regex problems.
Tom Dawes-Gamble
tmdg at weardale.cl
Sun Aug 6 11:11:05 UTC 2006
On Sun, 2006-08-06 at 10:36 +0100, ed wrote:
> On Sat, 05 Aug 2006 23:06:20 +0000
> Tom Dawes-Gamble <tmdg at weardale.cl> wrote:
>
> > I am trying to tweak it. But don't seem to be able to get the
> > "and"
> > "or" and "not" functionality working.
>
> milter is new to me, but if it helps, I don't think NOT is possible in
> regex (is that a double negative?), the closet you can get to it is
> something like:
>
> /^[^E][^d][^w][^a][^r][^d]$/
>
May be I should have given more detal. See:
http://www.benzedrine.cx/milter-regex.html
for the man page etc.
The "not" bit is not a regex not as such it to link two regex.
as in this example from the man page.
header /From/ /domain/i and body /money/
( not header /From/ /domain/ ) and ( body /sex/ or body /fast/ )
In the examples I gave i.e.
reject "Not today thank you!"
header /(To|Cc)/i /(spam1|spam2)@domain.co.uk/
Or
reject "Not today thank you!"
envrcpt /(spam1|spam2)@domain.co.uk/
reject "Not today thank you!"
header /To/i /spam1 at domain.co.uk/
Works and mail gets rejected.
reject "Not today thank you!"
header /(To|Cc)/i /spam1 at domain.co.uk/
lets the mail though.
reject "Not today thank you!"
envrcpt /spam1 at domain.co.uk/
Works and rejects if the To: or Cc: lines match.
reject "Not today thank you!"
envrcpt /(spam1|spam2)@domain.co.uk/
Lets the mail though again. <sigh>
Tom.
Tom.
--
There are 10 types of people in the world.
Those that understand Binary and those that don't.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20060806/8035977f/attachment.bin
More information about the Sclug
mailing list