System Administration

STop my hpux servers from sending any emails

 
Eiprel
New Member

STop my hpux servers from sending any emails

I did the following things but the server is still sending out my test emails. How do i stop my server from doing that ?
(this is the requirement)

/etc/mail/sendmail.cf has a relay server defined at DS. I didn't commented it out yet

[root@test:/etc/mail]# /sbin/init.d/sendmail stop
Sendmail pid is 1866
Killing sendmail
Please wait ......
Sendmail killed.
[root@test:/etc/mail]#

 In /etc/rc.config.d/mailservs 

Was
export SENDMAIL_SERVER=1

Now
export SENDMAIL_SERVER=0

I sent a test email from my server to my email id

tail -f  /var/adm/syslog/mail.log
Jun 2 16:07:56 <myservername> sendmail[8997]: 152F7mA08997: from=root, size=4, class=0, nrcpts=1, msgid=<202106021507.152F7mA08997@.<myservername>, relay=root@localhost
Jun 2 16:07:57 test sendmail[8997]: 152F7mA08997: to=<myemailid>, ctladdr=root (0/3), delay=00:00:09, xdelay=00:00:01, mailer=relay, pri=30004, relay=<myrelayserver> [3.159.213.48], dsn=2.0.0, stat=Sent (ok: Message 983149296 accepted)

1 REPLY 1
KishJ
HPE Pro

Re: STop my hpux servers from sending any emails

Greetings,

 

With those settings you have successfully disabled sendmail from starting at boot and disabled sendmail from receiving mails. However, outgoing mails will still work which is why you are able to send a test mail. 

 

Since, sendmail is just one of the mailer services I don't think you will be able to completely eliminate this service. 

 

At best (again do it your own risk) you may disable sendmail command itself from being an executable and/or rename it. 

 

Hope it helps.

 


I am a HPE Employee

Accept or Kudo