sendmail cannot receive emails

Hi, I am running RedHat Linux 7.1 (all patches applied), and I can only send out emails, but cannot receive emails.

ps x tells me that sendmail (is) accepting connection.
I tried to restart several times, but no fix.  (I am a newbie in Linux).

My connection to the Internet is T1, and my httpd and sshd and others are working just fine.  If anyone could help me on this, I would be grateful!

Who is Participating?
jlevieConnect With a Mentor Commented:
There are two obvious possibilities. One is that you are running a local firewall which prevents inbound SMTP conections. The other is that you haven't adjusted the sendmail configuration (per the Release Notes) to listen on other than the localhost IP.

By default sendmail on RH 7.1 and later is configured to only listen in the localhost IP. This is easily changed by edition /etc/mail/ and commenting out the line that reads:

DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')

by inserting 'dnl ' at the beginning of the line. Then build a new with:

 m4 /etc/mail/ > /etc/

and restart sendmail (/etc/init.d/sendmail restart). You should then be able to verify that sendmail is listening for connections by opening a telnet session to the system's IP on port 25 (e.g., telnet 25). It doesn't matter whether this is done on the local machin or from some other host. If the sendmail config has been correctly changed you'll get the Sendmail greeting.

If there's a local firewall in the way you can temporarily disable it by doing '/etc/init.d/ipchains stop'. If that solves the problem you'll know that you need to add a rule permitting inbound SMTP connections.
Can you give an example of how you send mail?
If somebody from the outside world is mailing you
Then you have to need some MX record in a DNS server who points to your physical IP address
Simple way of testing it is by connecting local on smtp port

>telnet loaclhost 25
This will connect on TCP port 25 (smtp)
You should get a welcome smtp message.

if this works then you know that the local config is working fine.

waiting until you tried
golgoAuthor Commented:
Thank you, everyone, for your help!

And, jlevie, thank you very much for your solution!
It worked!  However, I've got another problem.  I will post it in one of these days.  Thanks again!!

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.