LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-05-2003, 09:24 PM   #1
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Rep: Reputation: 15
Question sendmail listening on port 25


when I do a netstat -nl

I get this:

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN


I need to change it to:

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

but am having no luck.

I've edit the O DaemonPortOptions in sendmail.cf and even tried commenting it out completely. I am having no luck whatsoever.

I've added the ip to the /etc/mail/access file and still no luck...

I'm trying to dabble with iptables and I don't see anything for smtp

Please help...thanks
 
Old 08-05-2003, 10:05 PM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
have u restarted sendmail?
 
Old 08-05-2003, 10:16 PM   #3
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Original Poster
Rep: Reputation: 15
yup...after everytime I made a change
 
Old 08-05-2003, 10:24 PM   #4
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Why do you want to change it to 0.0.0.0 ?

That is the usually the address of a network, not a host.
 
Old 08-06-2003, 08:47 AM   #5
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Original Poster
Rep: Reputation: 15
it's only listening on the loopback...I need it to listen on all interfaces
 
Old 08-06-2003, 03:15 PM   #6
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
First of all, in the new sendmail more secure scheme of operation , you have a process mqueue which picks up the mail messages from the host and then passed them on to sendmail for SMTP delivery.

So in you need in /etc/mail/submit.mc

divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
dnl #
FEATURE(`use_ct_file')dnl
dnl #
FEATURE(`msp', `[your_host.your_domain.COM]')dnl

Change your_host to real name of your host, and your_domain.COM to real_name of your domain.

In your sendmail.mc you need

sendmail.mcAEMON_OPTIONS(`Port=smtp,Addr=your_host.your_domain.COM,Name=MTA')dnl

and do not forget that in /etc/xinetd.d/smtp you need

#*****************************************************************************#
#
# file : /etc/xinetd.d/smtp
#
#*---------------------------------------------------------------------------*#
#
# description : The smtp server provides mail service.
#
service smtp
{
bind = <IP Number of your_host.your_domain.COM>
disable = no
log_on_failure += USERID
server = /usr/sbin/sendmail
server_args = -Am -bs
socket_type = stream
user = root
wait = no
}
#
#*****************************************************************************#


Once you have edited submit.mc and sendmai.mc you have to regenerate your *.cf files, so do

# cd /etc/mail
# make clean
# make

and you need to restart xinetd with

# /etc/init.d/xinetd restart
 
Old 08-07-2003, 01:38 PM   #7
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Original Poster
Rep: Reputation: 15
I've done that and still nothing. It's really odd. It just doesn't want to listen on any interfaces except 127.0.0.1

Thanks for the help anyways
 
Old 08-07-2003, 10:52 PM   #8
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
So what happens when you

telnet non_loopback_ip 25
 
Old 08-07-2003, 10:54 PM   #9
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Using the settings I gave you above, I get

lsof -i | egrep smtp
xinetd 958 root 10u IPv4 2420 TCP myhost.mydomain.COM:smtp (LISTEN)
 
Old 08-08-2003, 08:38 AM   #10
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Original Poster
Rep: Reputation: 15
This is telnet response:
telnet: connect to address 192.168.1.140: Connection refused



sendmail 23641 root 4u IPv4 55698 TCP localhost:smtp (LISTEN)
 
Old 08-08-2003, 01:32 PM   #11
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
So in your sendmail.cf and xinetd/smtp files you have not set the daemon to listen on your hostname.domain.COM but on your localhost (127.0.0.1).

The lsof clearly indicates that you have it only running on localhost.

Did you remember to do a

# cd /etc/mail
# make clean
# make

and /etc/init.d/xinetd restart after making the changes?
 
Old 08-08-2003, 02:58 PM   #12
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Original Poster
Rep: Reputation: 15
I am not using xinetd.

This is the Option in sendmail.cf

O DaemonPortOptions=Port=smtp, Name=MTA

I've left out the Addr pair because according to the bat book, if that is left out, it will allow connections from any network.

I've also tried that line with the Addr=[IP] and that doesn't work either.

Thanks
 
Old 08-08-2003, 03:44 PM   #13
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
If you are not using xinetd, you should be :+)

It is standard since Red Hat 7.3 I think, and comes with SuSE 8.0

So you will need an entry in your inetd.conf file

smtp@your_ip_number stream tcp nowait root /usr/bin/tcpd /usr/sbin/sendmail -Am -bs

And do not forget to restart inetd with

/etc/init.d/inetd restart
 
Old 08-11-2003, 02:21 PM   #14
dskny
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE8.0+, RedHat
Posts: 25

Original Poster
Rep: Reputation: 15
thanks for the help, but the answer was actually in /etc/sysconfig/mail

for smtp to listen on remote addresses
 
Old 08-12-2003, 06:52 PM   #15
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Well on RedHat 9, there is no /etc/sysconfig/mail file.

There is however an /etc/sysconfig/sendmail and the only options in there are

DAEMON=no
QUEUE=1h

So if you want sendmail to be running all the time, you would set DAEMON=true, whereas if you only want sendmail to run when somebody tries to connect then you leave it as 'no', and configure xinetd appropriately.

And please not that the options in this file do not specify which interface sendmail listens on; that is specified in sendmail.{cf,mc} and submit.{cf,mc} as previously stated.

Last edited by Corin; 08-12-2003 at 06:53 PM.
 
  


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
2 servers listening on port 80 possible? scrawl Linux - Software 1 03-13-2005 05:06 PM
Sendmail and changing it's default listening port... darkarcon2015 Slackware 7 01-20-2005 11:17 PM
Listening on a serial port calebsg Linux - General 2 10-13-2004 10:45 AM
Sendmail not listening eggoz Linux - Software 6 09-06-2004 04:08 AM
ssh listening on port 22 sharpie Linux - Security 9 06-08-2004 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:19 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