DevHeads.net

Re: DKIM setup writeup for multi domain?

Hi, wouldn't the answer to the OP's question be to just list all the domains they want signed in the file
/etc/opendkim/SigningTable

Assuming they are using Opendkim.

I wrote some documentation here.
<a href="https://linux.uits.uconn.edu/dkim-review-of-all-aspects/" title="https://linux.uits.uconn.edu/dkim-review-of-all-aspects/">https://linux.uits.uconn.edu/dkim-review-of-all-aspects/</a>

-ANGELO FAZZINA

<a href="mailto: ... at uconn dot edu"> ... at uconn dot edu</a>
University of Connecticut,  ITS, SSG, Server Systems
860-486-9075

I think this is the one I used. Works great.
<a href="https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.stevejenkins.com%2Fblog%2F2011%2F08%2Finstalling-opendkim-rpm-via-yum-with-postfix-or-sendmail-for-rhel-centos-fedora%2F&amp;data=02%7C01%7Cangelo.fazzina%40uconn.edu%7C9624b05d01574a99475608d6a71b7196%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636880133650788591&amp;sdata=YTfwUuvVVUSb8bzRRKXWNg1xpaVCclorJ6eKAxz2ybw%3D&amp;reserved=0" title="https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.stevejenkins.com%2Fblog%2F2011%2F08%2Finstalling-opendkim-rpm-via-yum-with-postfix-or-sendmail-for-rhel-centos-fedora%2F&amp;data=02%7C01%7Cangelo.fazzina%40uconn.edu%7C9624b05d01574a99475608d6a71b7196%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636880133650788591&amp;sdata=YTfwUuvVVUSb8bzRRKXWNg1xpaVCclorJ6eKAxz2ybw%3D&amp;reserved=0">https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.st...</a>

Comments

Re: DKIM setup writeup for multi domain?

By Michael at 03/12/2019 - 15:19

I found my notes. This is for RHEL:

yum -y install
<a href="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" title="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm">https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</a>
subscription-manager repos --enable "rhel-*-optional-rpms" --enable
"rhel-*-extras-rpms"
yum -y install opendkim

#generate keys for each domain
cd /etc/opendkim/keys
mkdir example1.com
mkdir example2.com
opendkim-genkey -D /etc/opendkim/keys/example1.com/ -d example1.com -s
dkim1 -a
opendkim-genkey -D /etc/opendkim/keys/example2.com/ -d example2.com -s
dkim1 -a

chown -R root:opendkim /etc/opendkim/keys/*
chmod 640 /etc/opendkim/keys/example1.com/dkim1.private
chmod 644 /etc/opendkim/keys/example1.com/dkim1.txt
chmod 640 /etc/opendkim/keys/example2.com/dkim1.private
chmod 644 /etc/opendkim/keys/example2.com/dkim1.txt

#/etc/opendkim.conf
Mode s
#LogWhy yes
#KeyFile /etc/opendkim/keys/default.private
KeyTable /etc/opendkim/KeyTable
SigningTable refile:/etc/opendkim/SigningTable
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts

#/etc/opendkim/KeyTable
dkim1._domainkey.example1.com
example1.com:dkim1:/etc/opendkim/keys/example1.com/dkim1.private
dkim1._domainkey.example2.com
example2.com:dkim1:/etc/opendkim/keys/example2.com/dkim1.private

#/etc/opendkim/SigningTable
*@example1.com dkim1._domainkey.example1.com
*@example2.com dkim1._domainkey.example2.com

#/etc/opendkim/TrustedHosts
127.0.0.1
10.0.0.0/8

#/etc/postfix/main.cf
#OpenDKIM
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept

Re: DKIM setup writeup for multi domain?

By Voytek Eymont at 03/17/2019 - 07:21

thanks for all the replies, all very helpful, half way there

V