Basic DKIM back-end for outbound emails

Version 1.38


For current installs, use this more modern guide here: ----------------------- Older, original guide: Basic implementation of DKIM. This does not set your exim.conf for you (to do that, see below). This only set's up the keys and adds them to the dns (which is the hard part anyway) Only try this feature if you are comfortable with system customizations. This requires exim 4.70 or newer. To enable it, add this to the directadmin.conf and restart DA: dkim=1 The internal default is 0. This flag will trigger the calling of: /usr/local/directadmin/scripts/ The script has ways of calling it: 1) If you're wanting to add dkim to just one domain, use it like this: ./ which will trigger a task.queue call to add the newly created keys into dns. 2) DA will call the script for newly created domains like this: / nodns which skips the task.queue entry, as DA will add the dns right after the call to the script internall (no need to wait a minute for it to be added) This 2nd option won't be used much. 3) If you want to trigger the adding of dkim to all of your existing domains, use this: echo "action=rewrite&value=dkim" >> /usr/local/directadmin/data/task.queue This option hasn't been tested much (works find for 1.. so should work fine for all.. in theory) *REQUIRED CHANGES* Edit your /etc/exim.conf. Find this code: remote_smtp: driver = smtp change it to be: remote_smtp: driver = smtp dkim_domain = $sender_address_domain dkim_selector = x dkim_private_key = ${if exists{/etc/virtual/$sender_address_domain/dkim.private.key}{/etc/virtual/$sender_address_domain/dkim.private.key}{0}} dkim_canon = relaxed dkim_strict = 0 and restart exim. That should start adding the DKIM headers to your outbound emails. Note, emails generated on the hostname (like apache/php scripts) will probably need you to run: ./ and add the dkim TXT records gets added to the dns manually based on /etc/virtual/ It takes out the ---- lines and all newline characters when adding it to dns. For domain created after this is all setup, this does not need to be called manually. Note, the absence of the key won't break anything... so you may want to hold off on the hostname key until more testing has been done. --------------------- To test your DKIM setup, see check this tool:

Interested to try DirectAdmin? Get a 30-day Free Trial!