Saturday, January 29, 2011

Configuring a Basic Mail Server on AIX.

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

No comments:

Post a Comment