LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-20-2002, 03:06 PM   #1
360
Member
 
Registered: Jun 2001
Distribution: FC4
Posts: 136

Rep: Reputation: 15
Need help fast. How do I get sendmail to listen on port 25?


RH7
I have sendmail listening on port 25 locally but when I type:
netstat -an | grep LIST

... I see that it is not listening to the internet.
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

I need to read:

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

I do I change or add:
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

Thanks
 
Old 05-20-2002, 03:18 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
please don't say things like "need help fast", it'll only make people ignore the thread deliberately...

so how far have you actaully got with sendmail? i rpesume not too far. in which case sendmail is still presumably suign the default port settings in /etc/mail/sendmail.mc look at that file and there should a a line in it near the bottom that deliberatley limits it to 127.0.0.1 only, and will have that IP address in it.. i can't remember what the line says, but there's *usually* a comment in the file telling you what to do with it, which i think it to jsut remove the line all together.
 
Old 05-20-2002, 04:33 PM   #3
360
Member
 
Registered: Jun 2001
Distribution: FC4
Posts: 136

Original Poster
Rep: Reputation: 15
My apologies for the unacceptable subject.

Sendmail is working fine but I am unable to recieve messges from outside the box.

here is my sendmail.mc file. Which line do I need to adjust?

divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file. If you modify thei file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl m4 /etc/sendmail.mc > /etc/sendmail.cf
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work.
include(`/usr/lib/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
define(`confDEF_USER_ID',``8:12'')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define('ALIAS_FILE','/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/sendmail.st')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
dnl define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn')dnl
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(local_procmail)dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not hav 24x7 DNS do need this.
FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Thanks.
 
Old 05-20-2002, 04:50 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
right, so the bit i meant was:

dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

you could try putting that in without the Addr= line... but y'know that's all i needed to do to get my sendmail working... comment out that last line.. heh, after that...
 
Old 05-20-2002, 06:32 PM   #5
360
Member
 
Registered: Jun 2001
Distribution: FC4
Posts: 136

Original Poster
Rep: Reputation: 15
I changed the following lines in the sendmail.cw file but after running the command:
netstat -an | grep LIST
It still does not print:
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

All I see for port 25 is:
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN


Here are the lines I edited. Commented out the first and added the second:
dnl Cwlocalhost.localdomain
DAEMON_OPTIONS(`Port=smtp,Name=MTA')

Thanks for your help.

Last edited by 360; 05-20-2002 at 06:41 PM.
 
Old 05-21-2002, 11:54 AM   #6
Jon-
Member
 
Registered: Dec 2001
Distribution: RH5.2/6.2/7.0/7.1/7.2/9/ES21/ES31
Posts: 91

Rep: Reputation: 15
Did you regenerate the .cf file and restart sendmail?

Check the first 10 lines of that .mc file you posted...
 
Old 05-21-2002, 12:15 PM   #7
360
Member
 
Registered: Jun 2001
Distribution: FC4
Posts: 136

Original Poster
Rep: Reputation: 15
Yes I regenerated the file.

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Port 80 listen without WebServer? hacinn Linux - Security 5 06-30-2004 10:52 PM
Port won't Listen dvong3 Linux - Networking 4 05-12-2004 01:18 PM
Can vsftpd listen to another port? twelve Linux - Networking 9 05-05-2004 09:13 PM
How to make a program to listen on a Particular port palanisaravanan Linux - General 4 04-14-2004 07:43 PM
how to change wu-ftp listen port? jamil5454 Linux - Networking 3 01-05-2004 08:07 AM


All times are GMT -5. The time now is 09:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration