1847302 Members
2703 Online
110264 Solutions
New Discussion

sendmail

 
SILVERSTAR
Frequent Advisor

sendmail

Hi,

on a HP-UX B.11.11 U 9000/800 I need to disable the mail service, no mail have to be sent out from the server.

I have stopped the sendmail issuing the following command: /sbin/init.d/sendmail stop

When I issued:
mailx -s "TEST" myuser@xxx.xx < /dev/null
I have received the mail but I did not expect to receive that mail !

Why the mail are sent although the sendmail service was down ? I have checked for sendmail process "ps -ef |grep send" but nothing was running.

regards.
Angelo
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: sendmail

The sendmail process does NOT have to be running to send mail from a server. The sendmail process that runs is normally just used for RECEIVING e-mail via port 25 via SMTP.

When you send mail, sendmail is invoked briefly to allow the mail to leave the server.

If you don't want any mail to leave the server, you could rename /usr/sbin/sendmail to /usr/sbin/sendmail.orig. Any mail that you try to send now will get moved to a dead.letter file in your home directory.
Steven E. Protter
Exalted Contributor

Re: sendmail

Even with the service disabled, mailx elm and other tools will use the sendmail binary to send mail from the system.

It is possible with malicious scripting to force the system to accept mail as well.


The way to avoid this is to remove the binaries or remove execute permissions from them.

Careful though, lots of script programmers and products assume that sendmail is there.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
SILVERSTAR
Frequent Advisor

Re: sendmail

Hi ,

I have decided to comment out the lines related to
# "Smart" relay host (may be null)
inside the sendmail.cf

Having done this, I receive no more mails.

It seems to be enough, doesn't it ?

thanks
Angelo
KapilRaj
Honored Contributor

Re: sendmail

Correct .. I was about to type it


Kaps
Nothing is impossible