1833549 Members
3013 Online
110061 Solutions
New Discussion

Re: Disabling Sendmail

 
SOLVED
Go to solution
brian_31
Super Advisor

Disabling Sendmail

We have been asked to disable sendmail for a short period due to security reasons. I would like to know what would be the impacts!!

1. we use mailx in our scripts (to send message to root)
2.Is it true that we will not be able to send messages but would receive messages??
3. What would be the correct procesdure to disable the daemon?

Thanks
Brian.
6 REPLIES 6
Brian Bergstrand
Honored Contributor

Re: Disabling Sendmail

1 & 2. False, you can still send mail, but you can't receive it.

3. /sbin/init.d/sendmail stop

or

# killsm

To permantly disable it, edit /etc/rc.config.d/mailservs and change SENDMAIL_SERVER=1 to =0.

HTH.
John Dvorchak
Honored Contributor

Re: Disabling Sendmail

No quite the opposite. You can send mail from the HPUX box with sendmail disabled. You will not be able to receive mail. But then I have never felt compelled to send an email to any of my systems.
If it has wheels or a skirt, you can't afford it.
brian_31
Super Advisor

Re: Disabling Sendmail

Thanks. OK, now we have some scripts which use mailx and send alert to to "root" on the same system. will that work. I assume it will.

Thanks

Brain.
Brian Bergstrand
Honored Contributor
Solution

Re: Disabling Sendmail

Yes, that will work fine. mailx invokes sendmail and as mentioned, there is no need to have the daemon running to deliver mail (even over the network).

HTH.
Jim Mallett
Honored Contributor

Re: Disabling Sendmail

Brian,

Yes, even if you run /sbin/init.d/sendmail stop you will be able to send mail within the same machine to your root account.

Jim
Hindsight is 20/20
Steven E. Protter
Exalted Contributor

Re: Disabling Sendmail

If you shut down the daemon, it is still possible to use sendmail to send mail.

Maybe you want this, maybe you don't, hard to tell from your message.

To make sure that sendmail can't send mail without benefit of the daemon, you need to change permissions or rename the sendmail binary.

chmod a-x sendmail

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