Solved

Sendmail on RHEL 4 not listening on all interfaces

Posted on 2008-06-14
5
1,810 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
[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
5 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Resolve DNS query failed errors for Exchange
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

707 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