Re: [Exim] Multiple dial-up accounts - again...

Top Page
Delete this message
Reply to this message
Author: Pawel Konieczny
Date:  
To: exim-users
CC: Philip Hazel
Subject: Re: [Exim] Multiple dial-up accounts - again...
On Thu, Feb 01, 2001 at 10:52:52AM +0000, Philip Hazel wrote:
> What the Exim documentation actually says is
>
> $host: When the "smtp" transport is expanding its options for encryption using |
> TLS, $host contains the name of the host to which it is connected. Likewise, |
> when used in the client part of an authenticator configuration (see chapter |
> 35), $host contains the name of the server to which the client is connected. |
>
> Note the qualifications ("When ..."). The return_path option is a
> generic option which is expanded before the transport is called, and
> therefore before it connects to any host, so $host is unset at this
> time. There may, of course, be a list of hosts to which it will try to
> connect. It does not re-expand return_path for each host.


OK, I understand. For the record, I found a solution that works:

  return_path = ${lookup{\
                    # $host should suffice, but...
                    ${lookup{*} lsearch{/etc/ppp/smtp-hosts} \
                        {${extract{1}{: \t}{$value}}} \
                     }\
                 }\
                 partial-lsearch {/etc/ppp/smtp-sender} {$value} fail}


where /etc/ppp/smtp-hosts is the same file as used by the smart router, set up
by a ppp-up script depending on the provider connected to.  The format of this
file is, of course:
*    smtp.myisp.com    byname


It would be nice if the router could define and pass user variables to transports.

--
Pawel Konieczny