Solved

Sendmail on RHEL 4 not listening on all interfaces

Posted on 2008-06-14
5
1,803 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
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

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Question has a verified solution.

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

Suggested Solutions

Microsoft has released various new features which are capable of handling various tasks. One of these tasks is ‘Migration from pop3 to Exchange Server’. Pop3 data stores various data along mailboxes like contacts, tasks, etc. So, it becomes the need…
Resolve DNS query failed errors for Exchange
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

948 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

23 Experts available now in Live!

Get 1:1 Help Now