Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sendmail cannot receive emails

Posted on 2002-06-28
4
Medium Priority
?
199 Views
Last Modified: 2013-12-15
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!

golgo
0
Comment
Question by:golgo
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 200 total points
ID: 7120067
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/sendmail.mc and commenting out the line that reads:

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

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

 m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

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 1.2.3.4 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.
0
 
LVL 1

Expert Comment

by:petereilering
ID: 7127023
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
0
 
LVL 1

Expert Comment

by:petereilering
ID: 7127030
Simple way of testing it is by connecting local on smtp port
25

>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
0
 

Author Comment

by:golgo
ID: 7128260
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!!

golgo
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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

963 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