Re: [exim] Using flat lists of domains in exim.conf domain l…

Góra strony
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Dla: Adam Funk
CC: exim-users
Temat: Re: [exim] Using flat lists of domains in exim.conf domain lists and lookup expansions.
On 2006-03-20 at 11:34 +0000, Adam Funk wrote:
> I'm fairly certain that for an option that takes a domain list, the
> following the correct way to say "this option applies if the domain is
> in either of the two lists", and that I can use entries like
> "*.example.com" lines as well as "example.com" in both lists. Right?
>
>    queue_smtp_domains = /etc/foo0 : /etc/foo1


Yes. But note that *.example.com does not match example.com; you need
both entries.

zsh% print -l 'example.org' 'foo.example.net' '*.example.com' >/tmp/wibble
zsh% rlwrap exim -C =(print -l "domainlist fred = /tmp/wibble" ".include /etc/exim/exim.conf") -be
> ${if match_domain{example.org}{+fred} {yes}{no}}

yes
> ${if match_domain{example.net}{+fred} {yes}{no}}

no
> ${if match_domain{foo.example.net}{+fred} {yes}{no}}

yes
> ${if match_domain{foo.example.com}{+fred} {yes}{no}}

yes
> ${if match_domain{example.com}{+fred} {yes}{no}}

no


>    delay_warning_condition = ${lookup {$domain} \
>        wildlsearch {/path/to/queue.list} {no} {yes} }

>
> What would be the syntax for saying "don't issue warnings if the
> domain is in either of these two files, taking initial '*.' into
> consideration"? I'd like to be able to use entries like
> "*.example.com" here too.


 domainlist defer_warning_domains = /etc/foo0 : /etc/foo1
 #...
 delay_warning_condition = ${if match_domain{$domain}{+defer_warning_domains} \
     {no}{yes}}


match_domain is available from Exim 4.33 onwards.

Regards,
-Phil