[exim] Re: Send mail via fallback interface

Góra strony
Delete this message
Reply to this message
Autor: Andrew C Aitchison
Data:  
Dla: exim-users
Temat: [exim] Re: Send mail via fallback interface
On Thu, 7 Mar 2024, Patrik Peng via Exim-users wrote:

> 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?


I would try moving them to a seperate queue and sending to the "other"
interface from that queue.
I've no ide whether it would work or whether the queue
would need a seperate exim config, or could be run from
the existing config.

-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew@???


--
## 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/