Can't send mail from centos 7

As part of some intrusion detection scripts I run on linux, I send email to an external address.  I have a Centos 7 box on which this does not work -

maillog:
Jul 29 11:59:19 xxxxx postfix/error[9768]: 869ED42E0E1A: to=<xxxxx>, relay=none, delay=56356, delays=56295/61/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mxXXXXX.com[xx.xx.xx.xx]:25: Connection timed out)
Jul 29 11:59:19 xxxxx postfix/error[9759]: C562A42FB5BA: to=<xxxxx>, relay=none, delay=221956, delays=221896/61/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mxXXXXX.com[xx.xx.xx.xx]:25: Connection timed out)
Jul 29 11:59:19 xxxxx postfix/error[9769]: C82BB432C71A: to=<xxxxx>, relay=none, delay=200356, delays=200296/61/0/0.04, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mxXXXXX.com[xx.xx.xx.xx]:25: Connection timed out)

Notes:
1. firewalld is off and masked out
2. selinux is off and disabled
3. ping to the server works, network connectivity is fine
4. another centos 7 box on the same network sends to the same server with no problem at all (not connection releated)
5, telnet to the server on port 25 times out as well
6. port 25 to ANY server appears to time out

It would seem to me that this has nothing to do with:
1. my connection
2. postfix config
3. typical blocking packages (firewalld, iptables, selinux)

I am at a loss - thoughts?
smithwareAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
arnoldConnect With a Mentor Commented:
Look at the routing table on the system, netstat -rn
Can you connect from this system to any external source including browsing a web site
Compare this info to the one on the functioning server
try this,
telnet www.experts-Exchange.com 80
Does it timeout as well?

run traceroute www.experts-Exchange.com

The issue could be as simple as a typo in the netmask. Default router/gateway entry.
0
 
arnoldCommented:
Double check whether your external firewall or your provider is blocking your ability to get to any mail server on the net except your provider's. You may have a rule limiting port 25 access to a specific ip/range.


You could configure postfix with a transport/relay to send any outgoing through an approved mailserver.......
0
 
smithwareAuthor Commented:
Arnold -

FYI, I'm using Verizon Fios

I have multiple machines that send email via smtp to the same server/port combo, and I did no configuration on the router for any of the other servers,, so I know it's on this particular box rather than elsewhere in the environment.
0
 
smithwareAuthor Commented:
Routing is fine, I have connectivity on other ports - telnet to multiple sites on 80, 443, etc., works fine.  Pings to external servers (including smtp server) work fine.  It seems to be just port 25.  I disabled the firewalld service and masked it when I originally set the server up, but it feels like it's still running.

Logically, it should be the postfix config, but postconf -n shows the same config as the sister server that works fine.
0
 
arnoldCommented:
The error you get is indicative of a network related issue routing see whether you have firewalld or iptables running.

Update your postfix config to route outgoing emails to your other server.


On that thought, can you telnet to your other internal server's SMTP port without issues.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.