Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Exim 4


(error)

Danger

Versions of Exim prior to the current major release are considered obsolete. If you are using Exim 3.x or earlier it is suggested by the Exim development team that you upgrade to the current release.

The following configuration file, which can be found at /etc/exim4/update-exim4.conf.conf, was pulled from Ubuntu Server 10.4 and is for example purposes only:


_12
dc_eximconfig_configtype='smarthost'
_12
dc_other_hostnames=''
_12
dc_local_interfaces='127.0.0.1'
_12
dc_readhost='your.server.name'
_12
dc_relay_domains=''
_12
dc_minimaldns='false'
_12
dc_relay_nets=''
_12
dc_smarthost='smtp.sendgrid.net::587'
_12
CFILEMODE='644'
_12
dc_use_split_config='false'
_12
dc_hide_mailname='true'
_12
dc_mailname_in_oh='true'

Enable TLS support in /etc/exim4/exim4.conf.localmacros.

(information)

Info

If this file does not exist, you will need to create it:


_10
MAIN_TLS_ENABLE = 1

Enter credentials that will allow Exim to access SendGrid in /etc/exim4/passwd.client:

(information)

Info

Note that you must use an API key to authenticate. Do this by setting your username to 'apikey' and your password to your API key's actual value (the string provided by Twilio SendGrid when you created the key).


_10
*:apikey:<YourAPIKey>

Once you have completed and saved all changes to Exim's configuration files, you will need to restart it to activate those changes:


_10
/etc/init.d/exim4 restart


cPanel

cpanel page anchor

If you are using cPanel with Exim and want to relay your email through SendGrid, go to Main > Service Configuration > Exim Configuration Editor, click on the Advanced Editor button, and enter the following in the AUTH Box:


_10
begin authenticators
_10
_10
sendgrid_login:
_10
driver = plaintext
_10
public_name = LOGIN
_10
client_send = : apikey : <YourAPIKey>

(information)

Info

Only include "begin authenticators" if it's not already in the configuration.

Add a route in the Router Configuration Box:


_10
send_via_sendgrid:
_10
driver = manualroute
_10
domains = ! +local_domains
_10
transport = sendgrid_smtp
_10
route_list = "* smtp.sendgrid.net::587 byname"
_10
host_find_failed = defer
_10
no_more

Add a transport to the Transport Configuration Box:


_10
sendgrid_smtp:
_10
driver = smtp
_10
hosts = smtp.sendgrid.net
_10
hosts_require_auth = <; $host_address
_10
hosts_require_tls = <; $host_address

Once you have completed and saved all changes to Exim's configuration files, you will need to restart it to activate those changes:


_10
/etc/init.d/exim4 restart


If your version of Exim does not match the version above or you are not finding the answer you need, please check out the Official Exim Documentation(link takes you to an external page) for more information.


Rate this page: