Mailing List Archive

Outbound SMTP interface selection vs SMTP connection re-use
We have an SMTP transport which selects the outbound interface based on
a number of factors.

We have noticed that if a mail is not delivered immediately, it is
sometimes delivered as an additional message on an existing connection
which may not be using the same interface.  In this case, the logs show
it being delivered as the result of an "exim -MC" command.

Is this expected behaviour, and is there anyway to control it so that
the interface selection is always honoured for a message?

Paul


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Outbound SMTP interface selection vs SMTP connection re-use [ In reply to ]
On Fri, Nov 19, 2021 at 06:28:44PM +0000, Paul Warren via Exim-users wrote:
> We have an SMTP transport which selects the outbound interface based
> on a number of factors.
>
> We have noticed that if a mail is not delivered immediately, it is
> sometimes delivered as an additional message on an existing
> connection which may not be using the same interface.? In this case,
> the logs show it being delivered as the result of an "exim -MC"
> command.
>
> Is this expected behaviour, and is there anyway to control it so
> that the interface selection is always honoured for a message?

This problem was reported many years ago, per bug report tracker
https://bugs.exim.org/show_bug.cgi?id=1141

I believe a workaround was to use "connection_max_messages=1" on the
transport to allow only a single message on any given connection. We
made a special transport for the hosts that needed this so the rest of
our mail wasn't affected. Not sure if this is needed now, it's been a
while since I worked with interface switching.

-Dean

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Outbound SMTP interface selection vs SMTP connection re-use [ In reply to ]
On 19/11/2021 18:28, Paul Warren via Exim-users wrote:
> We have noticed that if a mail is not delivered immediately, it is sometimes delivered as an additional message on an existing connection which may not be using the same interface.

What version of Exim? What choices did the router make?

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Outbound SMTP interface selection vs SMTP connection re-use [ In reply to ]
On 19/11/2021 20:24, Jeremy Harris via Exim-users wrote:
> On 19/11/2021 18:28, Paul Warren via Exim-users wrote:
>> We have noticed that if a mail is not delivered immediately, it is
>> sometimes delivered as an additional message on an existing
>> connection which may not be using the same interface.
>
> What version of Exim?

4.92.3

> What choices did the router make?

This is the router:

hosted_hubbed_hosts:
  debug_print = "R: hosted_hubbed_hosts for $domain"
  driver = manualroute
  domains = ! +local_domains : @mx_any : +remote_mx_domains
  route_data =
${lookup{$domain}partial-lsearch{$config_dir/db/hosted_domain_routes}}
  condition =
${lookup{$domain}partial-lsearch{$config_dir/db/hosted_domain_routes}}
  transport = remote_smtp

route_data gets the destination hostname from the specified file.

Paul


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Outbound SMTP interface selection vs SMTP connection re-use [ In reply to ]
On 19/11/2021 18:28, Paul Warren via Exim-users wrote:
> We have an SMTP transport which selects the outbound interface based on a number of factors.
>
> We have noticed that if a mail is not delivered immediately, it is sometimes delivered as an additional message on an existing connection which may not be using the same interface.  In this case, the logs show it being delivered as the result of an "exim -MC" command.

Sounds rather like bug 1141 - but that was fixed long before
your version.

Could we see the transport definition also?
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/