Install exim and configure it as a SMTP mail server

1. Install the exim mail server as

# up2date exim

2. Change the default Mail Transport Agent (MTA) to exim:

# system-switch-mail

3. Select exim.

4. Edit exim’s configuration file as :

# vi /etc/exim.conf

In Main Configuration Settings, search for the entry called primary_hostname and add the hostname of system:

primary_hostname = server.hostname.com

5. Now, search for the entry for qualify_domain and uncomment it as:

qualify_domain = hostname.com

6. Close the /etc/exim.conf file and start the exim service:

# chkconfig exim on
# service exim start

7. You can check the connectivity of the default mailserver as :

# telnet localhost 25
Trying 145.0.0.1…
Connected to localhost.localdomain (145.0.0.1).
Escape character is ‘^]’.
220 server.hostname.com ESMTP Exim 4.43 Tue, 17 Sep 2006 05:30:16

If you get the similar output after installation, that’s means the installation was done.