Creating multiple DKIM records in powermta can be somewhat confusing, especially when trying to include everything into one config without using external config files.
I like to use external files that set all clients, or vmta’s apart from each other.
Below I have included an example showing how to use multiple DKIM settings so each client or vmta can be signed differently.
Lets assume your vmta’s are setup already. They will look something like this:
<virtual-mta 1> domain-key key1,domain.tld,/etc/pmta/keys/key1.domain.pem smtp-source-host 192.168.0.1 1.mta.domain.tld max-smtp-msg-rate 800/h </virtual-mta>
In order to include a external config file we must first create one. In this example I call it client1.txt
All my external files contain all the domain and sending limits and off course the DKIM settings. Below is an example of such external file.
<virtual-mta 1> max-smtp-out 3 max-msg-per-connection 100 max-rcpt-per-message 10 max-msg-rate 266/m retry-after 25m bounce-after 1440m max-connect-rate 10/m max-errors-per-connection 10 backoff-reroute-to-virtual-mta domain.tld #smtp-pattern-list backoff backoff-to-normal-after-delivery yes backoff-reroute-to-virtual-mta domain.tld backoff-to-normal-after 5m backoff-max-msg-rate 700/h backoff-retry-after 15m #smtp-421-means-mx-unavailable yes </domain> domain-key key1,domain.tld,/etc/pmta/keys/key1.domain.tld <domain *> dkim-sign yes dkim-identity @domain.tld </domain> </code>
In order to use this external file we have to add it to our pmta config. We add this line to the vmta that you have assigned to that specific client.
Your config will then look like something like this:
<virtual-mta 1> domain-key key1,domain.tld,/etc/pmta/keys/key1.domain.tld smtp-source-host 192.168.0.1 1.domain.tld max-smtp-msg-rate 800/h include /etc/pmta/client1.txt </virtual-mta>
You can now go-ahead and configure your different DKIM settings. Simply create another .txt document IE client2.txt and add it to your vmta in your config file.
PMTA might not allow you to save the config file if you edit your config in your web browser under the Monitoring section. To save the config successfully you have to edit it via command line and then reload PMTA.
Also be sure to the place or upload the txt file to your server and make sure the path is correct.