Thursday, January 18, 2007

How to - Setup exim4 on Ubuntu Linux machine.

So I don't have to go looking for this information each time I try to setup my email client exim (exim4 currently) I will place the how to do it here. I want to setup a simple mail setup with all mail being relayed via my SMTP ISP host and only retrieving mail via pop or imap clients.

Here is what you do:
# install exim4 first if not already installed.
$ sudo aptitude install exim4

#  this will start the configuration tool and questions that lead to a valid
# config file.
$ sudo dpkg-reconfigure exim4-config

# answer no to split files, I like a single config file.

# choose mail-sent-by-smart-host and no-local-delivery as my ISP
# will be my SMTP relay and I don't need to pull mail down to my
# machines.

# enter your hostname, provided by your ISP most of the time.

# set listening on hosts to as I am only sending outgoing
# mail and retrieving via pop or imap clients.

# I have no domains I wish to receive mail for, so leave the next option
# on the default of local host.

# visible domain name for local users I set to my ISP given domain name.

# outgoing mail host for sending is your ISP given SMTP server.

# for DNS queries I answered 'no', as this is the last question it ends
# and restarts the MTA (exim), time to test it by sending an email!

Pretty easy no? ;-)