Direct Admin

Directadmin uses include files in exim.conf to easily extend the config to enable a smart host. If you’re running exim.conf 4.5.7 or newer, you can use these 3 files for the related sections below:


wget -O /etc/exim.routers.pre.conf
wget -O /etc/exim.transports.pre.conf
wget -O /etc/


Step 1:

First edit /etc/

change the section ”’hide client_send = : [email protected] : yourpass”’

Be sure to keep the = and : sections. Change [email protected] to your mailbaby username. Change yourpass to your mailbaby pass. For example

hide client_send = : mailbaby : 68e9af2444722ffd228497dec28b0ae3b5c6413f7a2a9455c410872770165a66


Your mailbaby username will not contain a, but be a single username.


Step 2:

Edit /etc/exim.transports.pre.conf

Change ”’X-Authenticated-Id”’ to ”’X-AuthUser”’

With this change the section:

headers_add = "${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}"


headers_add = "${if def:authenticated_id{X-AuthUser: ${authenticated_id}}}"

Step 3:

Edit exim.routers.pre.conf

Change ”’route_list = *”’

Important: keep the * and there is a space after it

Change to


Step 4:

Restart exim based on your operating system

centos7/8/ubuntu would use

systemctl restart exim.service


Step 5: Set default SPF

/usr/local/directadmin/directadmin set extra_spf_value ””

systemctl restart directadmin.service

Further Reading: Please read for setting spf records.

Other recommends directadmin use rspamd. To further block inbound and outbound spam fuzzy storage as well as rbl examples using data from is available for use at

Leave a Reply

Your email address will not be published.