Project

General

Profile

Feature #476

Adding Extra DKIM Domain Keys to iRedMail/Amavisd

Added by Daniel Curtis almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Mail Server
Target version:
Start date:
11/12/2014
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

Assuming the domain is example.com:

  • Generate the new key.
    cd /var/lib/dkim/
    amavisd genrsa example.com.pem
    chmod 0644 example.com.pem
    
  • Add it to your amavisd.conf file. Search for "# Add dkim_key here.", and add it alongside the others, preferably in alphabetic order so you can find it faster.
    dkim_key("example.com", "dkim", "/var/lib/dkim/example.com.pem");
    
  • Add your new domain to @local_domains_maps in amavisd.conf. The line should now read something like this:
    @local_domains_maps = ( [".$mydomain", "firstdomain.com", "example.com"] );  # list of all local domains
    
  • Restart amavisd
    service amavisd restart
    
  • Test that the key was installed properly
    amavisd showkeys example.com
    
    • The output should be something like this:
      ; key#1, domain example.com, /var/lib/dkim/example.com.pem
      dkim._domainkey.example.com.   3600 TXT (
        "v=DKIM1; p=" 
        "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEzgjyG2It0ZdQQTgGNj2jNDKe" 
        "fsa978sd98fsd9vds97v9fHIUSAFHY(#@*oiu7cs98a9" 
        "afljhljoU(*@#&($*#@U9ujw9fewur0932870932" 
        "jvAe33lH9tiVljog1QYSUDOEAaads")
      
  • Add exactly what was printed above to the zone file in you nameserver(s). You should also include SPF and ADSP. For example a BIND configuration would look like:
    example.com.    IN TXT    "v=spf1 +a +mx ~all" 
    dkim._domainkey.example.com.   3600 TXT (
      "v=DKIM1; p=" 
      "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEzgjyG2It0ZdQQTgGNj2jNDKe" 
      "fsa978sd98fsd9vds97v9fHIUSAFHY(#@*oiu7cs98a9" 
      "afljhljoU(*@#&($*#@U9ujw9fewur0932870932" 
      "jvAe33lH9tiVljog1QYSUDOEAaads")
    _adsp._domainkey.example.com. IN    TXT    "dkim=all" 
    

Resources

#1

Updated by Daniel Curtis almost 10 years ago

  • Description updated (diff)
  • % Done changed from 0 to 20
#2

Updated by Daniel Curtis almost 10 years ago

  • Status changed from New to Closed
  • % Done changed from 20 to 100
#3

Updated by Daniel Curtis over 9 years ago

  • Target version set to FreeBSD 9
#4

Updated by Daniel Curtis over 9 years ago

  • Category set to Mail Server

Also available in: Atom PDF