Exim on CentOS

This is my quick guide to do an install and basic setup of exim on CentOS. This is not meant as a fully inclusive guide but it will get you on the way. Following this you should get a working exim install.

I will assume you have built a CentOS 4 / 5 Server, have yum working and have logged in as root.

You may want to make sure your up to date…

yum update

Install exim and mail switching tools

yum install exim
yum install system-switch-mail

Switch your MTA & set exim to start on boot

system-switch-mail
service sendmail stop
service exim start
chkconfig exim on
chkconfig sendmail off

Add a root alias, eg: “root: me@example.com”

vi /etc/aliases

You may also wish to add some config to your routers section like this, if you want to relay through a smart host.

vi /etc/exim/exim.conf

Then add this before the “dnslookup:” section.

to_smart_host:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = “* mail1.example.com:mail2.example.com;”

Restart exim

service exim restart

To test, send an email

echo “test” |mail -s “$HOSTNAME” me@example.com

Then you can flush the Exim queue and watch the log like this:

exim -qff ; tail -f /var/log/exim/main.log

Good luck!

(Visited 130 times, 1 visits today)
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.