Solved

Can't send mail from centos 7

Posted on 2016-07-29
5
94 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 77

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 77

Accepted Solution

by:
arnold earned 500 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 77

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

910 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

17 Experts available now in Live!

Get 1:1 Help Now