Re: [EXIM] virtual domain help

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Mark Seuffert (Pirates)
Cc: exim-users
Temas nuevos: [EXIM] relay domains and DBM files - wildcarding
Asunto: Re: [EXIM] virtual domain help
On Thu, 29 Oct 1998, Mark Seuffert (Pirates) wrote:

> Hmm... isn't this a (small) problem?
> I think a lot of email adresses are like 'adress@domain' and not like
> 'adress@???'. So a expression like "*another.de" is a MUST,
> even if it will match "abcdanother.de".


Well, it depends entirely on what you want to achieve.

> How about a better RE... as in perl... '^*another.de:*.another.de'
> the ^ stands for the beginning of the line. Is it understandable what I
> wanna say (sorry about my english)?


Yes, you can use a regular expression if you want to. You can say

relay_domains = ^regular expression

and thereby make the matching as complicated as you like. If a pattern
item starts with ^ it is interpreted as a regular expression. You could
say

relay_domains = ^(.*\.|)another\.de$

if you want to. That would match 'another.de' and any domain of the form
'x.another.de' where x is any number of characters.

The use of * on its own in a domain list item is _not_ a regular
expression. A pattern of the form *anything means "any domain ending
with 'anything'". It is very much quicker to test a pattern of this type
compared with a regular expression, which is why it is provided for
handling the simple cases. If it isn't powerful enough, then you have to
use the more expensive regular expression. However, the setting of
relay_domains using the regular expression above is exactly equivalent
to

relay_domains = another.de:*.another.de

and I am pretty sure that would prove to be faster, even though it has
to do two tests instead of one.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



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