Tuesday, May 20, 2008

AIX restart sendmail

This starts sendmail on AIX
startsrc -s sendmail -a "-bd -q30m"

/etc/mail
# more sendmail.pid
123468
sendmail -bd -q30m
# ps -ef | grep sendmail
root 123468 1 0 Oct 26 - 3:15 sendmail: accepting connections
smmsp 283660 14700 0 Oct 26 - 0:00 /usr/lib/sendmail
root 304634 273842 1 23:54:43 pts/1 0:00 grep sendmail
# kill -15 `head -1 /etc/mail/sendmail.pid`
# ps -ef | grep sendmail
root 123494 273842 1 23:59:56 pts/1 0:00 grep sendmail
smmsp 283660 14700 0 Oct 26 - 0:00 /usr/lib/sendmail
# sendmail -bd -q30m
# ps -ef | grep sendmail

root 274584 273842 1 00:00:38 pts/1 0:00 grep sendmail
smmsp 283660 14700 0 Oct 26 - 0:00 /usr/lib/sendmail
root 318830 1 0 00:00:32 - 0:00 sendmail: accepting connections

# ps -ef | grep sendmail
root 274586 273842 1 00:00:49 pts/1 0:00 grep sendmail
smmsp 283660 14700 0 Oct 26 - 0:00 /usr/lib/sendmail
root 318830 1 0 00:00:32 - 0:00 sendmail: accepting connections

# ls -l sendmail.pid
-rw------- 1 root 1586 26 Dec 03 00:00 sendmail.pid
# more sendmail.pid
318830
sendmail -bd -q30m