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 http://files.directadmin.com/services/SpamBlocker/smart_route/exim.routers.pre.conf
wget -O /etc/exim.transports.pre.conf http://files.directadmin.com/services/SpamBlocker/smart_route/exim.transports.pre.conf
wget -O /etc/exim.authenticators.post.conf http://files.directadmin.com/services/SpamBlocker/smart_route/exim.authenticators.post.conf

 

Step 1:

First edit /etc/exim.authenticators.post.conf

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 @domain.com, 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}}}”

Becomes:

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

Step 3:

Edit exim.routers.pre.conf

Change ”’route_list = * smtp.yourisp.com”’

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

Change smtp.yourisp.com to relay.mailbaby.net

 

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 ” relay.mailbaby.net”

systemctl restart directadmin.service

Further Reading: Please read https://help.directadmin.com/item.php?id=616 for setting spf records.

Other
Mail.baby recommends directadmin use rspamd. To further block inbound and outbound spam fuzzy storage as well as rbl examples using data from mail.baby is available for use at https://github.com/mailbaby/rspamd-rules

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *