Issues understanding and implenting DKIM with Amavis

Discussion in 'Installation/Configuration' started by Jay Harris, Jun 19, 2023.

  1. Jay Harris

    Jay Harris New Member

    Ok so first off the software on the system is located in Amavisd-new, so I am guessing this is a fork of the original software, but I am not 100% up on all Linux admin stuff so please bear with me,

    The process as I understand it is as follows, please correct me if I am wrong

    1. the mailserver holds the private DKIM key (located in the PEM file) for the signing domains (which in our case is a catchall setup)
    2. Amavisd uses this DKIM key to sign the outgoing emails
    3. The public key of the DKIM (other half) is translated into a readable language by invoking -showkeys
    4. that key (the public side) is placed in the registrars DNS (or the SOA server) such as godaddy, name, namecheap etc as a TXT record
    5. The above can be done for ANY domain that is on the mail server (The originating server) essentially the one key pair can have the public side used on many domains as they will all match the signing private key setup in amavisd

    Here is my issues.
    1. if my key is located on say THIS IP, and my public key is located at the DNS of THAT IP, how do they see each other
    2. when I export the DKIM PUBLIC key it seems like its malformed, am I supposed to edit it again prior to placing it in the DNS (Example below)
      Record Type: TXT | Host: _domainkey.generalkey.DOMAIN SPECIFIED in DNS | Answer "DKIM KEY output from -showkeys in AMAVIS
    3. I have posted some screenshots showing the following
      A. My DNS setup
      B. The way the key looks like when exported from -showkeys
    My confusion is when i run - testkeys I get "invalid (public key: not available)
    So I missed a step somewhere, but aside from the malformed key for the public side, and improper destination formatting? as well as it not being able to "see" the key" its close

    any help would be appreciated, apologies if this is in the wrong spot!

    Attached

    1. Example of output of keys in Amavis
    2. Example of a correctly formatted DNS DKIM entry (not from this mailserver)
    3. Example of error when trying to view keys from the public side
     

    Attached Files:

  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I assume you are using ISPConfig. To get some context, read this and post the report:
    https://forum.howtoforge.com/threads/please-read-before-posting.58408/
    I have to admit I did not understand most of your post, you seem to overly complicate matters. My signature has link to e-mail setup tutorial, it has info on setting up DKIM.
    With ISPConfig DKIM happens automatically, but if you have the DNS not on same ISPConfig system, you have to cut and paste the DKIM public key to that DNS. If you get problems when pasting there, search for old articles on this forum or just edit the dkim string, some want it in a particular way.
     
    ahrasis likes this.
  3. Jay Harris

    Jay Harris New Member

    I actually came for help, I do not know about the front end GUI everyone is so in love with, nothing in my configuration is "plug and play" and I thought when I saw people using the Amavis I might find some knowledgable people who were able to help me understand what I had been doing wrong. I am very sorry to bother you all. I had no idea I had stumbled onto another site for "Script kiddies". Can someone direct me to a site where someone can help me troubleshoot this?
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    If you follow the link posted by @Taleman above, you will know or at least learn to know how to troubleshoot properly.
     

Share This Page