OCI: Postfix Error"connect to example.com[192.168.y.x]:25:Connection timed out" while Sending Email
in Linux
Applies to:
Oracle Cloud Infrastructure
Linux x86-64
Symptoms:
Postfix connections to mail servers are timing out
Mar 20 08:16:48 <hostname> postfix/smtp[12481]: connect to example.com[192.168.y.x]:25: Connection timed out
Mar 20 08:16:48 <hostname> postfix/smtp[12481]: 4263A443F961: to=<test.user@example.com>, relay=none,
delay=349145, delays=349115/0.02/30/0, dsn=4.4.1, status=deferred (connect to example.com[192.168.y.x]:25: Connection timed out)
Cause
In this example, a custom dns server is used in /etc/resolv.conf which does not return MX records. When running command:
$ dig example.com MX
No answer section is provided, then postfix uses the domain ip address ( 192.168.y.x ) but since no mail services are running there, the connection times out.
Tagged:
0