Solved

Can't send mail from centos 7

Posted on 2016-07-29
5
81 Views
Last Modified: 2016-08-01
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?
0
Comment
Question by:smithware
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:arnold
Comment Utility
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
 

Author Comment

by:smithware
Comment Utility
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
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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
 

Author Comment

by:smithware
Comment Utility
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
 
LVL 76

Expert Comment

by:arnold
Comment Utility
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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013.  There was huge research been done and found solution for the duplicate mails. Especially when the user gets  duplicate mails.
Being able to change email signatures is made really simple with email signature software and services.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now