Solved

Sendmail on RHEL 4 not listening on all interfaces

Posted on 2008-06-14
5
1,798 Views
Last Modified: 2013-12-15
Good morning all.  I've got a RHEL 4 machine with sendmail installed.  I've modified /etc/mail/sendmail.mc to listen on all interfaces but when I do a netstat -tulpn | grep sendmail I get:

[root@db2 mail]# netstat -tulpn | grep sendmail
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      8108/sendmail: acce

As shown it's only listening on 127.0,0.1 port 25.  In the sendmail.mc file I uncommented and edited the following lines:
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl

As you might expect I can telnet to port 25 from localhost but from nowhere else.  What is causing this no not listen on all interfaces? What am I doing wrong here?  Just stumped.

Thanks in advance!
0
Comment
Question by:paulurfi
  • 3
5 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
Comment Utility
Have You build sendmail.cf from sendmail.mc?
Or maybe it's Your issue? http://www.sendmail.org/faq/section5#5.3.1.2
0
 

Author Comment

by:paulurfi
Comment Utility
To be honest I'm not sure how to answer your question.  I made the following changes to the sendmail.mc file:

DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl  # Removed 127.0.0.1 from this line to get it to listen to all interfaces
FEATURE(`relay_entire_domain')dnl            # New line
MASQUERADE_AS(`cadec.com')dnl                  # Remove dnl at start of line as well as changing the domain name
FEATURE(masquerade_envelope)dnl            # Remove dnl at start of line

Then I created a relay-domains file with some domain entries.

Then did...

# make -C /etc/mail
# service sendmail restart

0
 
LVL 3

Expert Comment

by:Sandy Kalugdan
Comment Utility
Have you tried opening port 25 to your network thru iptables?  You need to open port 25 for other IP in your network to access it.
0
 

Author Comment

by:paulurfi
Comment Utility
iptables is currently off:

[root@db2 ~]# service iptables status
Firewall is stopped.
0
 

Author Comment

by:paulurfi
Comment Utility
ravenpl,

Your answer let me to a temporary fix. I was able to get it working by directly editing sendmail.cf.  Not the best solution I know, but it worked in a pinch when it had to.  Why question is does anyone know why building sendmail.cf from sendmail.mc wouldn't produce the proper configuration?  Perhaps (and this is because I'm not that experienced with Sendmail) I didn't in fact build sendmail.cf from sendmail.mc.  I thought when I did the make -C /etc/mail that this is what happened. Is that correct?
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
Resolve DNS query failed errors for Exchange
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

743 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

21 Experts available now in Live!

Get 1:1 Help Now