Re: [Exim] Flexible Static Routing

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Harald Meland
Datum:  
To: Terry.Shows
CC: exim-users
Betreff: Re: [Exim] Flexible Static Routing
[Vincent Danen]

> staticroute:
>   driver = manualroute
>   domains = ! +local_domains
>   transport = remote_smtp
>   route_list = *.braindeath.dtdns.net braindeath-smtp.dtdns.net:1200;\
>                *.tomdp.com braindeath-smtp.dtdns.net:1200;\
>                *.steeplejack.ca 199.xx.xx.xx

>
> I'm not sure what's wrong. First, I don't know if I can specify an
> arbitrary port in this way; I think exim may be thinking 1200 is an
> alternate host to deliver to, but I didn't see anything in the specs
> about ports.


I suspect you'll have to do tricks with the 'port' setting on the
_transport_ to contact non-standard remote ports.

> However, that's not my immediate problem. Exim seems to skip over
> this router and go straight to the dnslookup router, which has me
> confused. If I do a "exim -bt joe@???"


Note that '*.steeplejack.com' will not match 'steeplejack.com',
because of the '.' preceding 'steeplejack'. The spec says, in section
'Domain lists':

   * If a pattern starts with an asterisk, the remaining characters of
     the pattern are compared with the terminating characters of the
     domain. The use of `*' in domain lists differs from its use in
     partial matching lookups. In a domain list, the character
     following the asterisk need not be a dot, whereas partial matching
     works only in terms of dot-separated components. For example, a
     domain list item such as `*key.ex' matches "donkey.ex" as well as
     "cipher.key.ex".


My guess is that the thing works if you instead do 'exim -bt
joe@???'.

You can solve this by either

* Doubling the entry, e.g.

     route_list = steeplejack.com host1:host2 ; *.steeplejack.com host1:host2 ; ...


* Using a regex instead of an leading asterisk pattern:

     route_list = ^(.*\.)?steeplejack\.com$


(No guarantees that I've used the correct number of backslashes in
there, though...)

* Some kind of single-key (file) lookup -- but then you should
probably consider switching from 'route_list' to 'domains' +
'route_data' to get string expansion.

> Should I have the three domains in the domains = line? I don't
> think it should really matter.


Neither do I.
--
Harald