views:

716

answers:

2

When I am using DomainKeys and DKIM together on a linux system, do I run both of them on the same port?

DomainKeys:
/usr/bin/dk-filter -l -p inet:8891@localhost -d example.com -s /var/db/ domainkeys/default.key.pem -S default

DKIM:
/usr/bin/dkim-filter -l -p inet:8891@localhost -c simple -d example.com -k /var/db/dkim/mail.key.pem -s mail -S rsa-sha256 -u dkim -m MSA

Or do I do something like this:

DomainKeys:
/usr/bin/dk-filter -l -p inet:8892@localhost -d example.com -s /var/db/ domainkeys/mail1.key.pem -S default

DKIM:
/usr/bin/dkim-filter -l -p inet:8891@localhost -c simple -d example.com -k /var/db/dkim/mail2.key.pem -s mail -S rsa-sha256 -u dkim -m MSA

Just wondering since information about DomainKeys and DKIM tell you to run them on the same port:
http://www.elandsys.com/resources/sendmail/domainkeys.html
http://www.elandsys.com/resources/sendmail/dkim.html

I want to run both of them together, is this a bad idea?

+2  A: 

You have to set it up on two differnt ports using two different services. I used dk-filter and dkim-filter on sendmail.

Add the services to your sendmail.mc, rebuild sendmail (make -C /etc/mail), start the services from the command line, and restart sendmail.

Ports 8891 and 8892 will work.

+1  A: 

To add to the other answer, which is correct (use different ports). If you happen to use CentOS, make may not be installed by default, you can install as root like so:

yum -y install gcc automake autoconf libtool make

this will install all required dependencies to use make as root, so when you edit sendmail.mc.

which will regenerate sendmail.cf, as well as regenerate .db files if you happen to also change them.

One last note about the port for dkim-milter - you can set it to whatever you want, but just make sure it is not a reserved port or default port for other common services. (don't set it to port 80 etc). The tutorial I found to get dkim-milter working with sendmail used port 10035 and that is what I used successfully.

jigglee
I am using ubuntu at the moment, but CentOS is also something people are interested in as well! Thanks for the post!
Daniel