Re: [exim] RES: RES: Retry hints for multiple outbound IP ad…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jasen Betts
Datum:  
To: exim-users
Betreff: Re: [exim] RES: RES: Retry hints for multiple outbound IP addresses
On 2013-08-28, James Pettyjohn <jamesp@???> wrote:
> I looked through the code there and it looks like this is not far off,
> smtp.c line 2860:
>
>      if (!smtp_get_interface(ob->interface, host_af, addrlist, 
> &ifchanges,
>           &interface, tid))
>        return FALSE;
>      if (ifchanges) pistring = string_sprintf("%s/%s", pistring, 
> interface);

>
> So it picks the right interface from a list of interfaces and
> differentiates the
> retries for one transport. In my case every transport has a different
> IP and
> each user is assigned to a transport.
>
> Looks like it needs to be changed to something like:
>
> if (ifchanges || RETRY_INCLUDE_INTERFACE &&interface != NULL) pistring
>= string_sprintf("%s/%s", pistring, interface);
>


Yeah a few lines up from that the author (of the comment) appears to be
thinking one might want to use a string expansion to pick which interface
will be used for delivery, and that this might effect deliverability.

The problem with that plan is that after a successful delivery the
connection is recycled without checking that the interface expansion
for the new message matches the currently open interface, of if the
purpose of the expansion was for segregation you can't do it that way.

The the alternative method is many transports each with a different
interface specified without any need for expansion.

You can force the behaviour you want by using anything that expands in
the interfaces line in your transport.

eg: "${lc:}" gets you an empty string, thus in your config file:

interfaces = 192.0.2.1${lc:}

That'll force the C variable ifchanges to TRUE.

--
⚂⚃ 100% natural