Re: [Exim] a few points I stumbled about

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: Joachim Wieland
CC: exim-users
Temat: Re: [Exim] a few points I stumbled about
On Mon, 11 Feb 2002, Joachim Wieland wrote:

> - command = adfdfasf "${if eq {...}{...} {-q ...}{}}"
> will call 'adfdfasf "-q ..."', not 'adfdfasf -q ...'


As MBM says, that's exactly as per spec. A quoted string cannot expand
into more than one argument.

> - variable for the return value of a command
>
> I didn't find a variable that holds the return value of a command. Is
> there any?


No, I'm afraid not.

> One could use it for the following configuration:
>
>   bounce_message_text = ${if eq {$return_value}{1} {first reason} {
>                ${if eq {$return_value}{2} {second reason}
>                     {other reason}
>                }}}


One reason that you couldn't do this is that a message may have more
than one recipient. If several of them fail, only ONE bounce message is
sent. So a single $return_value isn't good enough. If you want to send
text back in a bounce message, you can try using return_fail_output.

> I'd also appreciate a variable that contains the reason why a message
> has been bounced.


A message isn't bounced. An *address* is bounced.

> - Why can't I use ${if ... } for a return_size_limit?


Because I never thought anybody would want anything other than a hard
cutoff, since it's supposed just to be a safety catch. Note that that
option is documented as "integer", and it is not flagged as expanded.

> I tried these:


Don't you believe my documentation? :-)

> Furthermore it would be nice if return_size_limit could also be set in a
> transport as message_size_limit does.


Same problem as above. More than one address may be bounced.

> - can I create hostlists that are evaluated at the time a message is delivered?
> I would like to write something like:
>
> localpartlist foolist = pgsql; select ... from tblfoo where $local_part = ...;


WHICH local part? A message may have many recipients. If you use foolist
in the acl_smtp_rcpt ACL with a local_parts statement, then $local_part
should be set to the local part of the incoming RCPT address. But
otherwise it won't be set.

> - expanding $domain in ACL's
>
>   LOCAL_DOMAINS = pgsql;select domain from tbldomains \
>       where domain = '$domain' and relayonly = 0;

>
> ...
>
>   accept  domains       = LOCAL_DOMAINS
>           endpass
>           message       = unknown user
>           verify        = recipient

>
> When expanding LOCAL_DOMAINS, $domain seems not to be set.


Which ACL was this? If it was acl_smtp_rcpt, then $domain should be set.
My test suite includes examples of this. So if you are referring to
acl_smtp_rcpt, there is some problem that is caused by your precise
usage, and we need to investigate this further.

If you are talking about any other ACL, $domain won't be set. Let me
know which it is.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.