LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-19-2013, 04:46 AM   #1
limdel
Member
 
Registered: May 2009
Location: Ho Chi Minh City, Vietnam
Distribution: CentOS - FEDORA
Posts: 59

Rep: Reputation: 15
sendmail stop listenning on port 25


Hi,

After a fresh installation of CentOS (i386-minimal), i had installed sendmail to setup this box as SMTP gateway.

After basic setup,the command sendmail is able send email using:
Code:
cat email.txt | sendmail mymailbox@mydomain.com
However after restart service sendmail, the MTA deamon is listenning on port 127.0.0.1:25 for a few second:

Code:
# netstat -plnt |grep :25
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1197/sendmail
But after it's stop listenning at all.

on /etc/mail/sendmail.mc i have comment the default limitation
Code:
#DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
The firewall is setup as:
Code:
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

And the strange thing is the log file
Code:
# tail /var/log/maillog
Sep 19 16:02:11 centostest sendmail[1622]: daemon MTA: problem creating SMTP socket
Sep 19 16:02:11 centostest sendmail[1622]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting
"daemon MTA: server SMTP socket wedged: exiting", how can i troubleshoot this ? why the deamon would exit so quickly ? a conflict ?

Can anyone bring some light to my dark day ?
Any advise are welcome.

Thanks
 
Old 09-19-2013, 06:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
But after it's stop listenning at all.

on /etc/mail/sendmail.mc i have comment the default limitation
Code:

#DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
Use the following (add a dnl) to comment out the line:
Code:
dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
Or you can comment out both lines above, so sendmail listens on port 25 on all available interfaces.
 
Old 09-19-2013, 09:28 PM   #3
limdel
Member
 
Registered: May 2009
Location: Ho Chi Minh City, Vietnam
Distribution: CentOS - FEDORA
Posts: 59

Original Poster
Rep: Reputation: 15
@bathory
Thanks for the reply, you put me on the right direction.

The fact is that i didn't read carefully the "manual", shame on me !

I just notice that to comment a line in the sendmail.mc file we had to use the "dnl" not "#"

Now it's ok with this:
Code:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
Once again, thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing port in sendmail, sendmail not working. flschou Linux - Newbie 4 01-16-2008 09:03 AM
Listenning AccuRadio - HELP kamion SUSE / openSUSE 2 08-19-2006 09:11 AM
Want to stop Sendmail loading ZC1 Linux - General 1 05-13-2006 08:56 AM
how to stop sendmail spam ? basbosco Linux - Security 2 11-10-2003 01:17 PM
How to Stop Spamming in Sendmail johnlee Linux - Security 1 10-29-2001 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration