?
Solved

Sendmail on RHEL 4 not listening on all interfaces

Posted on 2008-06-14
5
Medium Priority
?
1,818 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 1500 total points
ID: 21785529
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
ID: 21785549
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
ID: 21787768
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
ID: 21789312
iptables is currently off:

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

Author Comment

by:paulurfi
ID: 21793216
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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Phishing emails are a popular malware delivery vehicle for attack.  While there are many ways for an attacker to increase the chances of success for their phishing emails, one of the most effective methods involves spoofing the message to appear to …
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
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
Suggested Courses
Course of the Month16 days, 2 hours left to enroll

850 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