Re: [exim] when are exim vars first available? and ...

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: OpenMacNews
CC: exim-users
Subject: Re: [exim] when are exim vars first available? and ...
On Thu, 29 Sep 2005, OpenMacNews wrote:

> (1) when in the mail transaction is each Exim variable FIRST
> available/defined?


The variables are always available, in the sense that their content can
always be substituted in an expansion. Some (e.g. $primary_hostname) are
always "set". Others start empty and get defined during processing. The
time of definition is usually relatively obvious: for example, the
$sender_host_address value is set when a client host connects; the
$sender_address value is set during the processing of the MAIL command;
etc.

> (2) what is the order of execution of acls?


The same order as the SMTP commands and other events to which they
apply.

> (3) how can do BOTH and acl_connect default/global DNSBL check, and a later
> acl_rcpt per-user spec?


acl_smtp_connect = acl1
acl_smtp_rcpt = acl2

acl1:
<verb> dnsbl = global:list:...

acl2:
<verb> dnsbl = ${lookup ... $local_part ... }

However, if you want to *block* the message on a per-user basis you will
have difficulty because a message may have multiple users with different
requirements. This problem has been discussed on the list several times
(it also applies to, for example, different spam scanning requirements).

There is No Easy Answer. The problem is caused by the way SMTP works.

-- 
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