Re: [exim] non-static qualify_domain

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Peter Bowyer
Data:  
Para: Exim, Users
Assunto: Re: [exim] non-static qualify_domain
On 10/01/07, Patrick von der Hagen <hagen@???> wrote:
> Hi all,
>
> I centrally manage an exim.conf which is to be installed on different
> servers in differend domains. The specific domain-name could be found in
> /etc/DOMAIN on each server.
>
> "qualify_domain = /etc/DOMAIN" would be great, but qualify_domain is not
> expanded. Now it is getting sort of tricky....
> Something like "qualify_domain = certainly.invalid.domain" and a rewrite
> rule
> "*@certainly.invalid.domain
> $1@${lookup{certainly.invalid.domain}lsearch{/etc/DOMAIN.exim}}"
> would work, however I'd have to guarantee that /etc/DOMAIN.exim exists
> and has an entry "certainly.invalid.domain" in the first place.
>
> Any ideas how to create a "better" setup? I could try to identify the
> primary hostname and do some extraction to skip the first part, which
> should usually work but a) qualify_domain still wouldn't be expanded and
> b) I don't like "should usually".


The canonical way round this is to use a macro in the 'qualify_domain'
line, and 'include' a local file at the top of the config which
defines local macros.

eg

.include /etc/DOMAIN.exim


qualify_domain= INCLUDED_DOMAIN


/etc/DOMAIN.exim contains

INCLUDED_DOMAIN=<something>


You'll still need to generate the include file either manually or with
some scriptery of course, but this way involves less hoop-jumping.

Peter
--
Peter Bowyer
Email: peter@???