Wednesday, September 16, 2009

Trouble-shooting mail in AIX

Go to the edit page to see the hidden characters:
References:
AIX/HP-UX interoperability Guide
Google online books on AIX Administration by Randal K. Michael

Changed the mail server. emails stopped coming from ors0 server.

Edit /etc/mail/sendmail.cf for replacing smart relay host from mciexch1 to mciexch2 (Change the ip address) and save the file.

Edit /etc/hosts for replacing host from mciexch1 to mciexch2 (Change the ip address) and save the file.

If we update any of the configuration info while sendmail is running, refresh the sendmail subsystem by issue an SRC refresh command or by sending the daemon a SIGHUP as
#refresh -s sendmail
#kill -1 `head -1 /etc/mail/sendmail.pid`

#head -1 sendmail.pid
#more sendmail.pid
#kill -1 `head -1 sendmail.pid`
#more sendmail.pid
#ps -efgrep mail
#lssrc -s sendmail
#stopsrc -s sendmail
#ps -ef|grep mail
#lssrc -s sendmail
#startsrc -s sendmail -a'-bd -q30m'
#lssrc -s sendmail
#ls
# more sendmail.pid

Test the mail as follow:
log in as oracle
cp .profile temp
sendmail -v oracle
sendmail -v yada@yada.com
cat /dev/null > /var/spool/mail/jayp
cat /dev/null > /var/spool/mail/vogtb
cat /dev/null > /var/spool/mail/doanl
cat /dev/null > /var/spool/mail/root

To get emails if there is any hardware failure:
Nothing needs to be done to enable diagela as it is enabled by default.
/usr/lpp/diagnostics/bin/diagela ENABLE

Smit diag
Select current shell diagnostics
Enter
Task Selection (Diagnostics, Advanced Diagnostics, Service Aids etc.)
Automatic Error Log Analysis and Notification
Enter
Display the error notification mailing list