1752790 Members
6498 Online
108789 Solutions
New Discussion юеВ

Re: SMTP DISABLE

 
SOLVED
Go to solution
Geoff Wild
Honored Contributor

Re: SMTP DISABLE

How are you testing if smtp is open?

try

telnet yourserver 25

If you get:

Trying...
telnet: Unable to connect to remote host: Connection refused

then it is disabled...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
whiteknight
Honored Contributor

Re: SMTP DISABLE

Gigiz,

To disable SMTP permanently

vi /etc/services

##commentted out
#smtp 25/tcp # Simple Mail Transfer Protocol

#inetd -c

WK
Problem never ends, you must know how to fix it
gigiz
Valued Contributor

Re: SMTP DISABLE

No WK,
you are mistaking if you comment the /etc/service however SMTP work.
whiteknight
Honored Contributor

Re: SMTP DISABLE

Gigiz,


# lsof -i TCP:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sendmail 1142 root 5u IPv4 0x4d13b4c0 0t0 TCP *:25 (LISTEN)

# cd /sbin/init.d
# ./sendmail stop
Shutting down sendmail ..... [ OK ]
Shutting down sm-client [ OK ]

# lsof -i TCP:25
# telnet nickel2 25
Trying...
telnet: Unable to connect to remote host: Connection refused
#

WK
Problem never ends, you must know how to fix it
whiteknight
Honored Contributor

Re: SMTP DISABLE

Gigiz,


# lsof -i TCP:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sendmail 1142 root 5u IPv4 0x4d13b4c0 0t0 TCP *:25 (LISTEN)

# cd /sbin/init.d
# ./sendmail stop
Shutting down sendmail ..... [ OK ]
Shutting down sm-client [ OK ]

# lsof -i TCP:25
# telnet pluto 25
Trying...
telnet: Unable to connect to remote host: Connection refused
#

WK
Problem never ends, you must know how to fix it
Ludovic Derlyn
Esteemed Contributor
Solution

Re: SMTP DISABLE

hi,

i have found this in my result of shc

Stop the sendmail daemon:
/sbin/init.d/sendmail stop
Deactivate server mode:
/usr/sbin/ch_rc -a -p SENDMAIL_SERVER=0
Disallow all SMTP status queries, add
O PrivacyOptions=goaway
to the /etc/mail/sendmail.cf file
add cronjob to process mail:
0,15,30,45 * * * * /usr/sbin/sendmail -q

Regards
L-DERLYN
gigiz
Valued Contributor

Re: SMTP DISABLE

ok