Add Additional Domain to OpenDKIM

- - posted in Uncategorized

Yet another step-by-step for my own reference.

  1. Generate keys for new domain
1
2
3
4
5

mkdir /etc/opendkim/keys/example.com  
/usr/sbin/opendkim-genkey -D /etc/opendkim/keys/example.com/ -d example.com -s default  
chown -R opendkim:opendkim /etc/opendkim/keys/example.com  
mv /etc/opendkim/keys/example.com/default.private /etc/opendkim/keys/example.com/default
  1. Edit KeyTable
1
2
3
vi /etc/opendkim/KeyTable```

Add new line

default._domainkey.example.com example.com:default:/etc/opendkim/keys/example.com/default

1
2

3. Add domain to SigningTable

vi /etc/opendkim/SigningTable“`

Add a new line:

1
2

*@example.com default._domainkey.example.com
  1. Add appropriate entries to TXT records for example.com

Done