Solved

Can't send mail from centos 7

Posted on 2016-07-29
5
134 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 78

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 78

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 78

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SMB share across internet 15 109
MAILCHIMP SUBSCRIPTION LINK 2 71
How to fix Dual Server Conflict GitLab vs Apache2 3 54
Linux recover lost file deleted by mv 1 27
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Zimbra is famous for its platform independency, ability to manage multiple user accounts, easy assimilation with 3rd party applications, social network certification etc. Here, we discuss about how users can move multiple Zimbra user accounts to Exc…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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