LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Need help fast. How do I get sendmail to listen on port 25? (http://www.linuxquestions.org/questions/linux-networking-3/need-help-fast-how-do-i-get-sendmail-to-listen-on-port-25-a-21402/)

360 05-20-2002 02:06 PM

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

acid_kewpie 05-20-2002 02:18 PM

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.

360 05-20-2002 03:33 PM

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.

acid_kewpie 05-20-2002 03:50 PM

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...

360 05-20-2002 05:32 PM

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.

Jon- 05-21-2002 10:54 AM

Did you regenerate the .cf file and restart sendmail?

Check the first 10 lines of that .mc file you posted...

360 05-21-2002 11:15 AM

Yes I regenerated the file.

Thanks


All times are GMT -5. The time now is 05:25 PM.