Re: [exim] Problem: Exim Retry Mails in Mail Queue using Oth…

Top Page
Delete this message
Reply to this message
Author: Lena
Date:  
To: exim-users
Subject: Re: [exim] Problem: Exim Retry Mails in Mail Queue using OtherInterface Address? Please Help.
> From: Alson Wong

> My server has 2 IP.
> IP #1: 1.2.3.4 (mx1.abc.com)
> IP #2: 5.6.7.8 (mx2.abc.com)


> dk_remote_smtp:
> driver = smtp
> interface = $interface_address
> dk_private_key = "/var/cpanel/domain_keys/private/${dk_domain}"
> dk_canon = nofws
> dk_selector = default


> I send some mails to yahoo.com via mx2.abc.com. From my current setup, exim
> will bind with IP #2 which is 5.6.7.8 and connect to yahoo. From yahoo point
> of view, it is connecting from 5.6.7.8.
>
> Yes, there is no problem about it. Then Yahoo deferred our mails with code
> 421 or 451. After that happen, we have some mails stuck in the mail queue,
> which is very normal also since later exim will pick up these mail for a
> retry.
>
> After 1 or 2 hours, I started to send some emails via mx1.abc.com (1.2.3.4),
> so as from my setup, exim will bind with ip 1.2.3.4 and connect to yahoo.
> >From yahoo point of view, it is connecting from 1.2.3.4 which is correct.
> And for mx1.abc.com (1.2.3.4), there's is 0 deferral from yahoo, all went
> out smoothly.
>
> Now the problem is, those mails I sent via mx2.abc.com previously which are
> stuck in mail queue, now automatically bind itself to ip 1.2.3.4 and send it
> out. The mail queue suddenly cleared and become empty. Checking our mails in
> yahoo shows that those mail previously sent via mx2 and stucked in mail
> queue, now being sent via mx1. Those mails suppose to comes from 5.6.7.8 now
> comes from 1.2.3.4.


Add in acl_smtp_mail, acl_smtp_rcpt, acl_smtp_predata or acl_smtp_data:

warn set $acl_m_incomingip = $interface_address

In your dk_remote_smtp transport change to:

interface = $acl_m_incomingip