IBM Support

Configuring a Mail Server on AIX.

Question & Answer


Question

How to configure a Mail Server on AIX.

Answer

Configuring a Basic Mail Server on AIX.

Special Notices:

Please use this information with care. IBM will not be responsible for damages of
any kind resulting from its use. The use of this information is the sole
responsibility of the customer and depends on the customer's ability to evaluate
and integrate this information into the customer's operational environment.

Contents

About this document
Configuring the sendmail.cf file
Creating database file and starting sendmail

About this document
------------------------------
The information on this document describes how to configure sendmail as a basic mail server,
and applies to AIX Versions 5.3TL6, 6.1.

Configure the file /etc/mail/sendmail.cf
--------------------------------------------------------
# vi /etc/mail/sendmail.cf

Uncomment the entry for local-host-names, it defines which domains the mail server will be responsible for.
# Fw/etc/mail/local-host-names

Uncomment the entry for relay-domains, it will be used to defined which hosts are allowed to use this server as a mail relay.
# FR-o /etc/mail/relay-domains

If the mail server is behind a firewall, you will need port 25 open. Typically a mail server has direct access through the firewall. But if the mail server does not have direct access through the firewall, then it will need to point to another mail server that can. In this case the admin can append the hostname of the mail server after the "DS".

# "Smart" relay host (may be null)
DSmailserver.domain.com

The parameters mentioned above are the most common ones. There are many other features that can be setup for a mail server, such as Mailertable, Genericstable, Virtusertable, etc. All these features are well documented in the following website.

http://www.sendmail.org/m4/features.html

Creating database file and starting sendmail
-----------------------------------------------------------------

Create the /etc/mail/local-host-names database file. It will contain all the domains that this mail server will be accepting mail for.

# vi /etc/mail/local-host-names
examples:
testdomain.com
somedomain.com

Create the /etc/mail/relay-domains database file. It should contain all the hostnames, subnets or domains that will be allowed to use this server as a mail relay.

#vi /etc/mail/relay-domains
examples:
testsystem
testdomain.com
10.1.1.1
192.168

Restart sendmail daemon with the new configuration
-----------------------------------------------------------------------------------

To stop sendmail run the following command.
# stopsrc -s sendmail

To start sendmail run the following command.
# startsrc -s sendmail -a "-bd -q30m"

To check if sendmail daemon is active run the following command.
# lssrc -s sendmail
Subsystem Group PID Status
sendmail mail 10352 active

Thank you for using AIX Technical Support Services.
If you have any questions please call 1800-IBM-SERV

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"APARs - AIX 5.3 environment","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3;6.1","Edition":"Standard","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
19 August 2022

UID

isg3T1011822