IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > AIXV53SMTP
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
AIXV53SMTP
Added by OneSkyWalker, last edited by OneSkyWalker on Aug 20, 2009  (view change)
Labels: 
(None)

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:

# "Smart" relay host (may be null)
DS

and change to:

# "Smart" relay host (may be null)
DSsmtp.microsquash.com

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:

surveyor:/ # telnet smtp.microsquash.com 25
Trying...
telnet: connect: Connection refused
surveyor:/ #

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:

surveyor:/ # telnet smtp.microsquash.com 25
Trying...
Connected to smtp.microsquash.com.
Escape character is '^]'.
220 relay1.seatac.microsquash.com ESMTP Sendmail 8.12.11.20060308/8.12.11; Wed, 19 Aug 2009 16:26:18 -0400

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:

[1] + Stopped (SIGTSTP)        telnet smtp.microsquash.com 25
surveyor:/ # ps -ef | grep telnet
    root 21676 22494   1 13:39:51  pts/0  0:00 grep telnet
    root 24008 22494   0 13:39:40  pts/0  0:00 telnet smtp.microsquash.com 25
surveyor:/ # kill 24008
surveyor:/ #
[1] + Terminated               telnet smtp.microsquash.com 25
surveyor:/ #

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:

Aug 19 11:52:40 surveyor mail:info sendmail[286748]: n7JIqehR286748: from=root, size=51, class=0, nrcpts=1,
                msgid=<200908191852.n7JIqehR286748@surveyor.seatac.microsquash.com>, relay=root@localhost
Aug 19 11:52:40 surveyor mail:info sendmail[479356]: n7JIqehR286748: to=billy@microsquash.com,
                ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120051,
                relay=relay1.seatac.microsquash.com. [65.54.166.122], dsn=2.0.0,
                stat=Sent (n7JInWC1006143 Message accepted for delivery)

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:

Aug 20 01:58:51 ec04 mail:info sendmail[389234]: n7JHqsls995436: to=billy@microsquash.com,
                ctladdr=root (0/0), delay=13:05:57, xdelay=00:00:00, mailer=relay, pri=2730052,
                relay=relay1.seatac.microsquash.com., dsn=4.0.0, stat=Deferred:
                Connection refused by relay1.seatac.microsquash.com.

then try telnet relay1.seatac.microsquash.com 25.

Note

The following message might appear in /var/adm/ras/syslog/syslog.out:

Aug 19 15:10:45 ec04 mail:warn|warning sendmail[495738]: gethostbyaddr(IPv6:::1) failed: 1

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:

::1		loopback localhost		# IPv6 loopback (lo0) name/address

(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.

Please help!

If you encounter an issue getting sendmail to work and are able to resolve it, please use the Add Comment link at the bottom of the page to document the issue and inform others of the resolution. Thanks!

(Note: Until you sign up and log in (using links in the upper right corner of this web page), you will not see the Add Comment link and you can not add a comment.)

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.


 
    About IBM Privacy Contact