Configure Sendmail on HPUX to listen on localhost only
HPUX 11.23
Edit /etc/mail/sendmail.cf – search for DaemonPortOptions and set
O DaemonPortOptions=Name=MTA, Addr=127.0.0.1
O DaemonPortOptions=Addr=127.0.0.1, Port=587, Name=MSA, M=E
Restart Sendmail
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Confirm sendmail is only listening on localhost
netstat -an | grep 25
tcp 0 0 127.0.0.1.25 *.* LISTEN
HPUX 11.11, HPUX 11.00 and HPUX 10.20
Edit /etc/mail/sendmail.cf – search for DaemonPortOptions and set
O DaemonPortOptions=Addr=127.0.0.1
Restart Sendmail
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Confirm Sendmail is only listening on localhost
netstat -an | grep 25
tcp 0 0 127.0.0.1.25 *.* LISTEN
HPUX 11.31
cd /usr/newconfig/etc/mail/cf/cf
./gen_cf
1 General Features
8: Send only
0 Main Menu
5: Generate sendmail.cf
6: Generate submit.cf
9: Create User and Queue for MSP
The group account for smmsp would be
created with the following gid value
gid = 25
> Do you want to continue and create the group with the above gid
Press any key to continue or [n/N] to change the gid value
Group created Successfully
The user account for smmsp would be
created with the following uid value(recommended).
uid = 2500
> Do you want to continue and create the user with the above uid
Press any key to continue or [n/N] to change the uid value
User created successfully
Creating Queue dir for MSP: /var/spool/clientmqueue/
Access permissions of /usr/sbin/sendmail is set to 2555
Group ID of /usr/sbin/sendmail is set to smmsp
Press any key to continue
0: Exit from selection
cp sendmail.cf.gen /etc/mail/sendmail.cf
cp submit.cf.gen /etc/mail/submit.cf
vi /etc/mail/sendmail.cf
O DaemonPortOptions=Name=MTA, Addr=127.0.0.1
O DaemonPortOptions=Addr=127.0.0.1, Port=587, Name=MSA, M=E
vi /etc/rc.config.d/mailservs
export SENDMAIL_SERVER=0
export SENDMAIL_SERVER_NAME=
export SENDMAIL_RECVONLY=0
export SENDMAIL_SENDONLY=1
cp sendmail.cf.gen /etc/mail/sendmail.cf
cp submit.cf.gen /etc/mail/submit.cf
vi /etc/mail/sendmail.cf
O DaemonPortOptions=Name=MTA, Addr=127.0.0.1
O DaemonPortOptions=Addr=127.0.0.1, Port=587, Name=MSA, M=E
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Confirm Sendmail is listening on localhost only
netstat -an | grep 25
tcp 0 0 127.0.0.1.25 *.* LISTEN