How to install Exim4 on Ubuntu as a smarthost

Posted by Martin Perron on Mar 11, 2008 in HowTo - LinuxNo comments

Firstly we install Exim4 using ‘Apt-get’ so logon to your Ubuntu/Debian system as the ‘root’ user. Then issue this command:-

apt-get install exim4 exim4-config

Then Ubuntu should install the packages and then once installed issue this command:-

dpkg-reconfigure exim4-config

Now a graphical user interface will load to help you configure Exim quick, I am using my ISP’s SMTP server to ensure that all user’s recieve the email as mail services like Hotmail etc. are likely to block emails from unknown hosts. So now at the graphical prompts I do as follows:-

1. Choose: Mail sent by smarthost; Recieved by SMTP or Fetchmail
2. Enter Smathost relay: smtp.yourisp.com

You will need to obviously need to change the host name of the smarthost to match your ISP’s mail server.

Now to test the mail server, I installed ‘mailutils’ so issue this command at the prompt to install mailutils

apt-get install mailutils

That will install some simple mail utilitys that will allow us to test sending an email etc. Once installed do as follows:-

mail youremail@yourdomain.inc (enter your email address here)
(press enter for Cc:, type in subject, press enter)
(type in body of message, then enter)
.
(type in single period, then enter, to end composing and email is queued)

Now you can check to see if the email message is still in the queue by typing the following command:

mailq

Your mail server should now be fully functional (for sending external messages) please not to recieve messages you may need further configuration of the mail server.

Hope this works for you.

From: http://bobbyallen.wordpress.com/2007/04/30/how-to-install-exim4-on-ubuntu-as-a-smarthost/

  • Share/Save/Bookmark

Leave a comment