SMTP – DKIM DirectAdmin with Exim 4

dkimSo we had these awesome DirectAdmin posts, although I do not like DirectAdmin one little bit, which got me started with the SMTP posts, this being the last one about DKIM.

After getting this cool mechanism configured on Postfix with and without Rspamd, this time we’ll be configuring it on a DirectAdmin enabled server with Exim 4.

It’s simple!

First add support to your Exim configuration.

# cd /etc
# wget -O exim.dkim.conf http://files.directadmin.com/services/exim.dkim.conf
# vi /etc/exim.conf

Lookup this code near the bottom:

remote_smtp:
driver = smtp

And change it to:

remote_smtp:
driver = smtp
.include_if_exists /etc/exim.dkim.conf

Restart Exim:

# systemctl restart exim

Now add it to DirectAdmin:

# cd /usr/local/directadmin
# cp -f conf/directadmin.conf conf/directadmin.conf.backup
# echo 'dkim=1' >> conf/directadmin.conf

All new domains will automatically be DKIM signed. You can copy the correct key from the local DirectAdmin DNS records. Existing domains have to be manually signed:

# cd /usr/local/directadmin/scripts
# ./dkim_create.sh domain.com

Within 2 minutes the DKIM record is added to the local DirectAdmin DNS server. Often you’ll use a external DNS server. Copy and paste the key to the external DNS like so:

2018._domainkey.yourdomain.com. 5 MINS TXT v=DKIM1; k=rsa; p=yourkeyhere

Complete series: Backscatter check, DMARC, SPF, DK1M with Postfix, DK1M with Postfix and rspamd, DK1M with DirectAdmin and Exim and SMTP checks.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.