dkim integration
It become more and more important in our days to satisfy the spf and dkim protocols should we be running mta.
The dkim can be installed almost straight forward following the different how-to's.
I found it however difficult to keep al those dns record accurate when I run with multiple clients. Typos, mistakes and the like.
I have patched the /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php and /usr/local/ispconfig/server/conf/bind_pri.domain.master to automate such task.
diff -r usr/local/ispconfig/server/conf/bind_pri.domain.master usr.base/local/ispconfig/server/conf/bind_pri.domain.master
48,51d47
<
< $TTL 0
< _domainkey TXT "o=~"
< $INCLUDE "/etc/dkim/keys/{tmpl_var name='origin_no_dot'}/default.txt"
diff -r usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php usr.base/local/ispconfig/server/plugins-available/bind_plugin.inc.php
103d102
< zone['origin_no_dot'] = substr(
zone['origin'],0,-1);
I have a script within my /etc/dkim/keys that generate a key for each domain I create folder for: /etc/dkim/keys/regen #!/bin/bash
for i in .; do if [ ! -f $i/default.txt ]; then echo New DKIM key for $i dkim-genkey -d $i -D $i chmod +r $i/default.txt fi done
Example folder structure:
/etc/dkim
-- keys |-- my-client-domain.com | |-- default.private |
-- default.txt
|-- my-client-domain.net -> /etc/dkim/keys/my-client-domain.com
|-- my-client-domain.org -> /etc/dkim/keys/my-client-domain.com
|-- example.com
| |-- default.private
| -- default.txt |-- regen |-- another-fqdn.com -> /etc/dkim/keys/another-fqdn.pt |-- another-fqdn.pt |-- default.private
-- default.txt
I think those patches are pretty straight forward and could elegantly be integrated within ISPConfig. A full integration could even check the presence of the key file and generated the DNS entry conditionally based on the presence of such.
Hope this FR will find its audience so ISPconfig will became even better. Cheers. (d)oekia