Back in Alchemer, under DKIM Settings you will need to generate your public key. This public key will then need to be added to your domain's DNS Server. Click Generate DKIM to generate your public key. Install and Configure OpenDKIM on CentOS 8/RHEL8. First enable the EPEL (Extra Packages for.
This tutorial is available in other languages. Help translate more
Italiano /
Don't know what DKIM is? Check our tutorial here: What is a DKIM DNS record.
Don't know where Amavisd config file is? check this tutorial:Locations of configuration and log files of major components.
iRedMail configures Amavisd to sign outgoing emails for the first mail domainyou added during iRedMail installation. If you added new mail domain, youshould update Amavisd config file to sign DKIM signature for it.
Let's say your first mail domain added during iRedMail installation ismydomain.com
, and new mail domain is new_domain.com
, please follow belowsteps to enable DKIM signing for outgoing emails of this domain.
if you already have a working DKIM and valid DKIM DNS record, it's ok touse this existing DKIM key to sign emails sent by other hosted mail domains.This way, you don't need to ask your customer who owns this new domain to addDKIM DNS record.
amavisd.conf
(find its location on different Linux/BSD distributions):Add one line in @dkim_signature_options_bysender_maps
, after 'mydomain.com'
line like below:
If you or your customer prefer to use their own DKIM key, you can generatea new DKIM key and ask your customer to add DKIM DNS record. Refer to ourtutorial to add DKIM DNS record.
Generate new DKIM key (key length 1024
) for new domain, and set correct file owner and permission
amavisd
, user/group is amavis:amavis
.amavisd-new
, user/group is amavis:amavis
.amavisd
, user/group is vscan:vscan
.amavisd
, user/group is _vscan:_vscan
.Note
amavisd
# amavisd -c /etc/amavisd/amavisd.conf genrsa /var/lib/dkim/new_domain.com.pem
# amavisd -c /etc/amavisd/amavisd.conf genrsa /var/lib/dkim/new_domain.com.pem 2048
amavisd.conf
:Add one line after above line like below:
amavisd.conf
:Add one line after 'mydomain.com'
line like below:
Again, don't forget to add DKIM DNS record for this new domain. The value ofDKIM record can be checked with command below:
After added DKIM DNS record, please verify it with command:
Note: DNS vendor usually cache DNS records for 2 hours, so if above commandshows 'invalid' instead of 'pass', you should try again later.
If you want to use one DKIM key for all mail domains, please follow steps below:
amavisd.conf
):@dkim_signature_options_bysender_maps
, and set it to:All documents are available in GitHub repository, and published under Creative Commons license. You can download the latest version for offline reading. If you found something wrong, please do contact us to fix it.