How to configure AIX V5.3 to send mail to users on other hosts
This page is intended to summarize (not replace) the AIX sendmail Basics
Technote.
To configure an AIX host so that its users can send mail to users on other hosts, add the SMTP relay host name to the otherwise blank line beginning DS in /etc/mail/sendmail.cf. First, before editing sendmail.cf for the first time, use 'cd /etc/mail ; cp -ip sendmail.cf sendmail.cf.orig' to save a copy, as suggested in the Before manually editing any file in the / and /usr filesystems for the first time, save a copy of the file best practice. Then, assuming an enterprise's SMTP relay server has hostname smtp.microsquash.com which can be accessed by the AIX host, look for:
and change to:
Please note that if sendmail.cf is rebuilt (see the /usr/samples/tcpip/sendmail/README from AIX 5L Product
Technote for more info) on AIX, any modifications to sendmail.cf will be overwritten.
If changing /etc/mail/sendmail.cf as described above does not work, confirm that AIX can access port 25 on the SMTP server. Output such as:
is bad news. The connection might be failing because the SMTP relay server is listening on a port other than 25. Only the administrator of the SMTP relay server will know for sure. See How do I send using an alternate port?
in the unlikely event that the SMTP relay server is not listening on the standard port.
The telnet failure above suggests that (1) server smtp.microsquash.com is not configured for SMTP relay or (2) a firewall is blocking access to port 25 on server smtp.microsquash.com or (3) who knows? AIX can not send mail to users on other hosts until a telnet command running on the AIX host can connect to port 25 of the SMTP relay server. If telnet to port 25 does not work, it is a waste of time to make changes the AIX configuration, unless the SMTP relay server is listening on a port other than 25.
On the other hand, output such as:
is good news, but might leave the telnet session hung. The telnet session will likely time out after 60 seconds, but to stop it immediately, use Ctrl-Z to put the hung telnet session in the background, then use the kill command to kill it:
If a telnet test shows that AIX can connect to port 25 of the SMTP relay server, then further diagnostic information can be obtained from syslog debug output. If syslog is not already configured, configure it by following instructions on the How to configure syslog on AIX V5.3 web page. The following output in /var/adm/ras/syslog/syslog.out is normal after the command 'mail -s Test billy@microsquash.com' is run on host surveyor:
If a "Connection refused" message is found in /var/adm/ras/syslog/syslog.out, then try to telnet to port 25 of the server which refused the connection. If, for example, the following message is found:
then try telnet relay1.seatac.microsquash.com 25.
 | Note
The following message might appear in /var/adm/ras/syslog/syslog.out:
This is a known issue with sendmail in AIX V5.3 TL10 (and potentially other higher Technology Levels). TL10 introduced the fix for APAR IZ45641 (IPV6 SUPPORT FOR SENDMAIL IS NOT ENABLED) . The fix causes gethostbyaddr calls to fail in sendmail. The problem introduced by the fix for APAR IZ45641 is documented in APAR IZ53501 (SENDMAIL WARNING --> GETHOSTBYADDR(IPV6:::1) FAILED: 1) . As of 8/18/2009, no fix for APAR IZ53501 is available. The message can be suppressed without backing out the fix for APAR IZ45641 by adding the following line to /etc/hosts:
(BTW, if /etc/netsvc.conf has an uncommented hosts= line, then local or local6 must appear on the line. Adding local4 to the line does not help and renders ineffective the ::1 line in /etc/hosts. See the netsvc.conf File article to understand the implications of local, local4, and local6.)
In any case, the sendmail warning message is only a warning. Unless NIS is in use, suppressing the warning message probably won't resolve any difficulty getting AIX to use an SMTP relay server. |
If a telnet test shows that AIX can connect to port 25 of the SMTP relay server, yet AIX can not send mail to users on other hosts and the messages in syslog do not provide the insight required to resolve the problem, please open a software trouble ticket with the IBM Support Center to get additional assistance.
The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the
Add Comment link at the bottom of the page to provide feedback. Note: Until you log in (using the link in the upper right corner of this web page), you will not see the
Add Comment link and you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.