Question

Configure DKIM with Ubuntu

Posted July 6, 2014 13.8k views

im trying to configure / set up DKIM in ubuntu to be used with sendmail or specifically PHP mail function..
found some articles on hot to configure it for postfix, …
but didnt get anything for sendmail with ubuntu..
im using ubuntu with LAMP install..
step- step guide will be appreciated or pls point to some articles…[not familiar with linux cmds]

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers
  • i have executed this command
    root@ubuntu:/etc/opendkim/keys# opendkim-genkey -D /etc/opendkim/keys/example.com -d example.com -s default
    how to get the public key and private key after this step ??

hi
in this particular line in /etc/opendkim.conf
Socket inet:8891@localhost
do we need to change to 1234@localhost to work with digital oceon ??
and thanks for the link
i have executed this command
root@ubuntu:/etc/opendkim/keys# opendkim-genkey -D /etc/opendkim/keys/example.com -d example.com -s default
how to get the public key and private key after this step ??

am i missing something ??

  • Both keys should be created in that directory.

    # opendkim-genkey -D /etc/opendkim/keys/example.com -d example.com -s default
    # ls
    default.private  default.txt
    # cat default.txt 
    default._domainkey  IN  TXT ( "v=DKIM1; k=rsa; "
          "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxh/I8WtYHR3yUEPFoPbJQGhjjiq3zSZJCvd7hfkFdSBcGCnIKDw6Yv75ej19xSlCxanz56oA3dmRgARh1Y639EWIADx0iFIZQMNuif2ZFCgougXt95xmbh+BwjQDm+l9Loz1/qv+KUrjIXar5p4qBoeJ6JYrugWcNbTAg+3EleQIDAQAB" )  ; ----- DKIM key default for example.com
    
  • for some reason thats not happening over here..
    but i executed this command
    opendkim-genkey -t -s mail -d example.com
    this generated mail.private and mail.txt
    inserted mail.txt to my dns and copied mail.private to /etc/mail/dkim.key
    inserted this to /etc/mail/sendmail.mc
    INPUT_MAIL_FILTER(opendkim’, S=inet:8891@localhost')
    executed this command
    # sendmailconfig; service sendmail restart; service opendkim start
    but still if i send mails dkim keys are not included ?
    Whats wrong ??

    Thanks
    Aamir

Submit an Answer