Hi list..
 
I have an issue with postfix resolving a domain - correctly, yet i want it to resolve differently..
 
The story so far..
 
Dec  7 00:39:06 newserver postfix/smtpd[13222]: connect from mail-wy0-f176.google.com [74.125.82.176]
Dec  7 00:39:06 newserver postfix/smtpd[13222]: 7D53D5C0BB: client= mail-wy0-f176.google.com[74.125.82.176]
Dec  7 00:39:06 newserver postfix/cleanup[13225]: 7D53D5C0BB: message-id=< xxxxxxxxxxxxxxxxxxxxxxx...@mail.gmail.com>
Dec  7 00:39:06 newserver postfix/qmgr[3002]: 7D53D5C0BB: from=someaddr...@gmail.com, size=1851, nrcpt=1 (queue active)
Dec  7 00:39:34 newserver postfix/smtpd[13229]: connect from localhost[127.0.0.1]
Dec  7 00:39:35 newserver postfix/smtpd[13229]: 15DE05C0BC: client=localhost[127.0.0.1]
Dec  7 00:39:35 newserver postfix/cleanup[13225]: 15DE05C0BC: message-id=< xxxxxxxxxxxxxxxxxxxxxxx...@mail.gmail.com>
Dec  7 00:39:35 newserver postfix/smtpd[13229]: disconnect from localhost[127.0.0.1]
Dec  7 00:39:35 newserver postfix/qmgr[3002]: 15DE05C0BC: from=<someaddr...@gmail.com >, size=2515, nrcpt=1 (queue active)
Dec  7 00:39:35 newserver postfix/error[13203]: 15DE05C0BC: to=< enduser...@example.com>, orig_to=< al...@example2.com>, relay=none, delay=0.34, delays=0.21/0.04/0/0.09, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to oldserver. example.com[81.100.100.100]:25: Connection timed out)
Dec  7 00:39:35 newserver amavis[2308]: (02308-19) Passed CLEAN, [74.125.82.176] [74.125.82.176] <someaddr...@gmail.com> -> < al...@example2.com>, Message-ID: < xxxxxxxxxxxxxxxxxxxxxxxxxxxx...@mail.gmail.com>, mail_id: 3a5Ulw9LI+7k, Hits: 0.096, size: 1851, queued_as: 15DE05C0BC, 24605 ms
Dec  7 00:39:35 newserver postfix/smtp[13226]: 7D53D5C0BB: to=<al...@example2.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=29, delays=0.42/0.03/8.5/21, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=02308-19, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 15DE05C0BC)
Dec  7 00:39:35 newserver postfix/qmgr[3002]: 7D53D5C0BB: removed
Dec  7 00:39:36 newserver postfix/smtpd[13222]: disconnect from mail-wy0-f176.google.com [74.125.82.176]
 
My issue is
 
 (delivery temporarily suspended: connect to oldserver. example.com[81.100.100.100]:25: Connection timed out)

oldserver.example.com has an internal, and external ip address..
 
81.100.100.100 as postfix has found out, is the correct address..  external ip address..
however, on a handful of domains, which are on a second mail server internaly, i need postfix to resolve to the internal ip..  eg 192.168.0.20
 
the time out is happening as the external ip address doesn't relate to anything on the network..  correctly..
 
my initial thoughts were to alter the hosts file
 
mufasa:~# more /etc/hosts
127.0.0.1       localhost
127.0.1.1       newserver.example.com newserver
192.168.0.20 oldserver.example2.com
 
which when I ping oldserver.example2.com i get as expected
 
newserver:~# ping oldserver.example2.com
 
PING oldserver.example2.com (192.168.0.20) 56(84) bytes of data.
64 bytes from oldserver.example2.com (192.168.0.20): icmp_seq=1 ttl=64 time=5.56 ms
64 bytes from oldserver.example2.com (192.168.0.20): icmp_seq=2 ttl=64 time=0.228 ms
64 bytes from oldserver.example2.com (192.168.0.20): icmp_seq=3 ttl=64 time=0.302 ms
 
i.e the internal ip address, so the hosts file change worked..
 
yet, after restarting everything, postfix still resolves to the external address...
 
So..  some googleing, and reading back on this list, i think this could have somthing to do with it..
 
smtp_host_lookup
 
I read about it, and it said that it will always lookup the dns, then the native, so i tried swapping them about
 
smtp_host_lookup = native,dns
 
but after all the restarts, its still giving the postfix log above..  i.e. its still resolving to the external ip.. 
 
Is there any way to get it to resolve a handful of domains to the internal ip address??
 
Fast approaching the edges of my knowledge and its uncomfortable!!  tbh, i think i may have passed the edge a few steps ago!!
 
Any help would be appreciated..
 
Michael

Reply via email to