Multiple DKIM records in powermta

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:

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.

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:

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.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

10 thoughts on “Multiple DKIM records in powermta”

  1. Hi Mate,
    I’ve got a trial from PowerMTA and been trying to setup a Server for Interspire + PMTA

    I’m having utter confusion in getting outgoing PMTA mails to be DKIM signed.
    Say I have one Domain only (suc.nl) at the moment. I don’t need to have separate “include” file, what will be the text I shall input?
    I have this in my Pmta config

    ## —- suc.nl ——-

    host-name suc.nl
    # domain-key _domainkey,suc.nl,/etc/exim/domains/suc.nl/dkim.pem

    If I uncomment the domain key line, pmta won’t start

    The key file exists in the above mentioned location, and if I send email via EXIM on the same server, it is duly DKIM signed.I’d appreciate a pointer on how to get my DKIM up with PMTA…

    Many thanks

    1. Hi Gags,

      the format doesn’t look right to me. Try adding it like this:

      Generate the key here and follow the right instruction on how to add it.
      Also run this from command line and paste the output if it wont start

  2. Hi mate,

    I made this in my config as per your suggestion but I still get “dkim=permerror”

    domain-key _domainkey,suc.nl,/etc/exim/domains/suc.nl/dkim.pem

    dkim-sign yes
    dkim-identity @suc.nl

    Don’t know what is wrong now…. please suggest

    1. Do you have an underscore in your line just before domainkey?? domain-key _domainkey,suc.nl,/etc/exim/domains/suc.nl/dkim.pem

      If you say you’re using exim, is pmta installed on the same server as cPanel? How did you setup your DKIM? in cPanel or manually?

      It could be a few things, difficult to say if I can’t see your config. Go to the contact us section and send me a link to your config on pastebin.

  3. Hello Mate, I try to add”include /etc/pmta/client1.txt” into config file but then pmta can not start. pmtad –debug show Startup error: Parse error in line 700 of /etc/pmta/config: unknown directive.
    Pls see below. How should I do ? thanks.

    # EOF

    domain-key mail1,domain.com,/etc/pmta/dkim/mail1.domain.com.pem
    smtp-source-host 142.4.124.222 mail1.domain.com

  4. # EOF

    domain-key mail1,domain.com,/etc/pmta/dkim/mail1.domain.com.pem
    smtp-source-host 142.4.124.222 mail1.domain.com

  5. Hello Mate,”include /etc/pmta/client1.txt” can not be be read ? I have uploaded client1.txt. do you know what’s the reason ?

  6. Is the file mail1.domain.com.pem in the folder /etc/pmta/dkim/? If yes, does it have the right read write rights?

Leave a Comment

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