[EXIM] Regular expressions.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Friso Kuipers
Date:  
À: exim-users
Sujet: [EXIM] Regular expressions.

Hello everyone,

On my domain, say 'frop.org', I have 'mailhost.frop.org' on-line
constantly. The other hosts on 'frop.org' poll 'mail.frop.org' with ETRN
when they come on-line. Obviously, I need to queue the mail for these
hosts by stating in configure:

queue_smtp = true

On the other hand, all mail to the outsite world can get send out right
away. After studying the pcre man page for some time I came up with
this:

queue_smtp_except = ^(?i)([^.]+)\.(?!frop\.org)(.*)$

Works fine, but needs refining. For instance, mail for
'host.frop.org.uk' would get queued also.

The question: is it possible to do conditional testing with regular
expressions? If I have

^(?i)([^.]+)\.(?!frop\.org)(.{0,8})(.*)$

mail for host.frop.org.uk would result in $3 not being empty. So I need
to be able to test for hosts being on domain 'frop.org' AND not having
trailing characters after 'org'.

I use 2.05 and have droppped off the list since january for some reason
beyond me, so if this came up before, sorry.

Yours,
Friso Kuipers.



--
*** Exim information can be found at http://www.exim.org/ ***