Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can't send mail from centos 7

Posted on 2016-07-29
5
Medium Priority
?
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 80

Expert Comment

by:arnold
ID: 41735370
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
ID: 41735390
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 80

Accepted Solution

by:
arnold earned 2000 total points
ID: 41735392
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
ID: 41735394
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 80

Expert Comment

by:arnold
ID: 41735399
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

610 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