I heartily recommend Exim4. I find it to be BY FAR the easiest/best email server for “send only” operations. It is a full MTA so you don’t need to rely on outside relays (gmail is commonly used with things like phpsendmail). Being a full MTA means that it can do a lot more but I haven’t ventured into using it for that and it is outside of the scope of this short article.

It should be noted that I am working on Ubuntu 14.04 LTS Server, however this will probably work on any debian variant of linux.

RHEL, Centos, Slackware, etc… go elsewhere.

So, if you need direct, send-only mail operations from your server, then here is a quick one liner for installing AND CONFIGURING Exim4:

First elevate yourself to root (okay, this is one EXTRA command…)

sudo su


apt-get update && apt-get -y install exim4 && cp /etc/exim4/update-exim4.conf.conf /etc/exim4/update-exim4.conf.conf.backup && sed -i 's/'dc_eximconfig_configtype=\'local\''/'dc_eximconfig_configtype=\'internet\''/g' /etc/exim4/update-exim4.conf.conf && sed -i 's/'dc_local_interfaces=\'127\.0\.0\.1\ \;\ \:\:1\''/'dc_local_interfaces=\'127\.0\.0\.1\''/g' /etc/exim4/update-exim4.conf.conf && service exim4 restart

I wrote that myself because I got really tired of manually configuring Exim every time I needed to install it. That command makes a backup of the default config file and then writes in the stuff to the active config file that makes it good for “send only” operations. It also locks it down so that only the local server can send email and you don’t end up with an open relay which is a bad thing.

Emails sent by your server will end up in JUNK by default for most providers. Additional setup of other stuff is needed to keep that from happening. This is really for Server Administrators and people that need to get alerts and whatnot from their box. You can whitelist in your receiving inbox to make sure emails don’t go to junk.


1 of 1

Leave a Reply