* on the Thu, Jul 09, 2015 at 10:48:50AM +0200, Peter wrote:

> I have just now stumbled upon a DNS item that I can not crack by myself
> and your help would be immensely appreciated.
> I have been forwarding my emails using postfix transport_maps to a
> couple MX weight-based receivers. Since the IPs of these servers have
> changed I updated my DNS records accordingly.
> 
> Here comes the postfix part. I am still having a couple of emails that
> have not been delivered because postfix remembers the old DNS resolution
> and I end up with deffered emails like this one here:
> 
> status=deferred (delivery temporarily suspended: connect to
> mail.server.com[105.106.107.108]:25: Connection timed out)
> 
> meanwhile the IP has changed and is no longer 105.106.107.108 and when I
> dig I get new IN A records.
> 
> How can I tell postfix the DNS has been updated so when I do postsuper
> -r ALL it "dig" again?

This isn't strictly a Postfix answer, but if you're using Linux you could
temporarily add a rule using iptables to redirect any connections to the
old IP, to the new IP. For example:

iptables -t nat -A OUTPUT -p tcp -d 105.106.107.108 --dport 25 -j DNAT \
    --to-destination 192.168.0.1

Where 192.168.0.1 is replaced by whatever the new IP should be. Assuming
you don't have any legit mail going to the old IP anymore.

-- 
Mike Cardwell  https://grepular.com/   https://www.parsemail.org/
OpenPGP Key    35BC AF1D 3AA2 1F84 3DC3  B0CF 70A5 F512 0018 461F
XMPP OTR Key   8924 B06A 7917 AAF3 DBB1  BF1B 295C 3C78 3EF1 46B4

* Want to hire me? Currently available for full-time and contracts
* https://hireme.grepular.com <- More info here

Attachment: signature.asc
Description: Digital signature

Reply via email to