Re: AW: [exim] Virtual Hosting

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Steffen Heil
CC: exim-users
Asunto: Re: AW: [exim] Virtual Hosting
On Tue, 26 Oct 2004, Steffen Heil wrote:

> I know that I can refer to different data files for different domains and
> such. I am doing this all the time.
> However, I am asking for a way to go one step further.
>
> I want to have a completely different logic for ACLs of different domains.
> In the exim config file, there are sections such as ACL and ROUTERS. I want
> to have a completely different section for different domains.


There is only one ACL section, but you can have any number of ACLs in
it, and select which one you want on the basis of anything you like. Or
you can keep ACLs in files.

> Really (except for main configuration entries) one exim4.conf per domain.
> That is my question.


Sender domain? Recipient domain?

> I still do not believe that this is possible.
> Right or wrong?


Wrong. For example, if you want to base the ACL that is run for RCPT
commands on the recipient domain, use

acl_smtp_rcpt = ${lookup {$domain} lsearch {/some/file}{$value}{default}}

where the file lists the domains and the names of the ACLs. Or where the
file lists the domains and the names of the files in which the ACLs live
(one per file). Or use any other feature of string expansions to give
you the name of the ACL you want to use (or the name of the file that
contains it).

See section 38.7 of the 4.40 ref manual "Use of the ACL selection
options".

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book