[exim] Send mail via fallback interface

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Patrik Peng
Date:  
À: exim-users
Sujet: [exim] Send mail via fallback interface
Hi

For situations where an IP is blocked or rate limited, we would like to
automatically try to send the mail via an alternate interface.

The following configuration achieves the desired result.
If a mail is queued for more than 5 minutes, it will be sent from a
different source IP.

remote_smtp:
  driver = smtp
  interface = ${if <{300}{${eval:$tod_epoch - $received_time}}{<; $FALLBACK_IPV4; $FALLBACK_IPV6}{<; $DEFAULT_IPV4; $DEFAULT_IPV6}}

While the mail can be sent on a second try, the retry database does not
reflect this:

Transport: mx1.host.net [123.123.123.123/NULL] error 60: Operation timed out
  first failed: 07-Mar-2024 12:01:28
  last tried:   07-Mar-2024 17:13:06
  next try at:  07-Mar-2024 18:43:06
Transport: mx2.host.net [123.123.123.124/NULL] error 60: Operation timed out
  first failed: 07-Mar-2024 12:01:06
  last tried:   07-Mar-2024 15:45:22
  next try at:  07-Mar-2024 17:15:22

After a while (past the final cutoff time), this causes mails to these
hosts to be bounced immediately (as documented).

Is there another way to retry sending mails from a different source
interface while maintaining correct retry db entries?

Kind regards,
Patrik



--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/