This is the main web site for the software projects Mail-DKIM and DKIMproxy.
Mail-DKIM is a Perl module that implements the new Domain Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard, both of which sign and verify emails using digital signatures and DNS records. Mail-DKIM can be used by any Perl program that wants to provide support for DKIM and/or DomainKeys.
DKIMproxy is an SMTP-proxy that signs and/or verifies emails, using the Mail::DKIM module. It is designed for Postfix, but should work with any mail server. It comprises two separate proxies, an "outbound" proxy for signing outgoing email, and an "inbound" proxy for verifying signatures of incoming email. With Postfix, the proxies can operate as either Before-Queue or After-Queue content filters.
Mail-DKIM and DKIMproxy are free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.
2008-02-14 - DKIMproxy 1.0.1 has been released
Version 1.0 of DKIMproxy is now available. Version 1.0 is a major upgrade over the previous version, 0.16. The new version supports several new features, including:
For more details on the new version, be sure to look at the RELEASE_NOTES, which are visible by clicking on the "Notes" icon on the Download page.
2007-11-06 - DKIMproxy participates in Interoperability Event, and more
DKIMproxy recently participated, along with 20 other organizations, in a DKIM Interoperability Testing Event at Alt-N Technologies in Dallas, TX. Although my participation was over the Internet, rather than in person, I still achieved quite a bit. The latest development release of the Mail::DKIM perl module (on CPAN) contains several fixes for problems discovered at the Interoperability event. These fixes will eventually improve not only DKIMproxy but also SpamAssassin which uses the same underlying module.
In other news, I've posted a test release of the next version of DKIMproxy! This test release introduces a number of long-awaited features, including
To use this test release, you will need the latest development release of Mail::DKIM. An easy way to get both is go to http://dkimproxy.sourceforge.net/, and look for the "Download" section. There are links there that will take you directly to the latest versions.
2007-10-11 - DKIM-Proxy now on SourceForge
Interest in DKIM-Proxy and Mail::DKIM has been heavier recently, so I finally decided to "bite the bullet" and move the project from my personal home page to SourceForge. Therefore, DKIM-Proxy now has a mailing list, as well as new forums and an issue tracker. If you want to get involved with DKIM-Proxy or Mail::DKIM, please subscribe to the mailing list and/or "monitor" the forums.
The project page for DKIM-Proxy is http://sourceforge.net/projects/dkimproxy.
Mail::DKIM requires the following Perl modules:
DKIMproxy is written in Perl. It requires the Mail::DKIM module, found on this page, as well as the following Perl modules:
Download the Mail-DKIM Perl module: Version 0.30.1 [CPAN].
See what's new in this release.
DKIMproxy is distributed in the hope that it will be useful, but (like any software) without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
Be careful when installing and using DKIMproxy! Because of how email delivery works, improper configuration or undiscovered bugs in DKIMproxy may result in it mangling, discarding, bouncing, or duplicating your email. You are advised to do some testing of DKIMproxy before using it on your production systems.
Download the current version of DKIMproxy: Version 1.0.1 [SourceForge].
See what's new in this release.
DKIMproxy has evolved from my earlier project, Dkfilter, which was based on smtpprox and Mail::DomainKeys. My thanks go out to Bennett Todd for providing smtpprox and Anthony D. Urso for providing Mail::DomainKeys.
The following steps are recommended for installing dkimproxy:
./configure --prefix=/usr/local/dkimproxy
DKIMproxy can be used to add DKIM support to any environment which uses SMTP to deliver email messages. First, you will need to decide whether you want to use DKIM/DomainKeys for signing outbound messages, verifying inbound messages, or both. You will need to configure your mail server to pass messages for signing or verifying to Dkimproxy, which will process the message and deliver it on to a predetermined SMTP address/port.
If you follow the instructions below, you will have the inbound (signature-verifying) proxy installed as a Before-Queue filter to verify inbound mail received on port 25, and the outbound (signing) proxy installed as an After-Queue filter to sign outgoing mail received on port 587. This means all of your users, when configuring their SMTP server, should specify port 587. Another method of supporting signing and verifying is to configure Postfix to listen on two different IP addresses, configuring one IP address for verification and the other IP address for signing.
Note: Please read and understand the Postfix documentation on content filters before attempting to use dkimproxy with Postfix.
The outbound proxy adds a digital signature to the header of each message it processes. To compute the signature, it needs access to an OpenSSL private key. In addition, in needs to know the name of the key selector being used, and what domain it should sign messages for. This information is specified with command-line arguments to dkimproxy.out.
But first, let's generate a private/public key pair and publish the public key in DNS.
openssl genrsa -out private.key 1024 openssl rsa -in private.key -pubout -out public.keyThis creates the files private.key and public.key in the current directory, containing the private key and public key. Make sure private.key is not world-readable, but still readable by the dkim user.
selector1._domainkey IN TXT "k=rsa; t=s; p=MHwwDQYJK ... OprwIDAQAB"where selector1 is the name of the selector chosen in the last step and the p= parameter contains the public-key as one long string of characters.
Now, configure command-line arguments for dkimproxy.out startup:
e.g.
dkimproxy.out --keyfile=/usr/local/dkimproxy/private.key --selector=selector1 \
--domain=example.org,example.com --method=relaxed \
127.0.0.1:10027 127.0.0.1:10028
Finally, you need to configure your mail server to filter outgoing, authorized messages only through the dkimproxy.out service on port 10027.
First off, if you use SpamAssassin, you may not want to use Dkimproxy for verifying messages. SpamAssassin includes a DKIM plugin which uses the same Mail::DKIM module to verify messages as DKIMproxy itself. All you need to do is install the Mail::DKIM module from this page and enable the plugin in SpamAssassin's config.
Otherwise...
The inbound proxy scans each message for DKIM and DomainKey signatures, attempting to verify any that it finds. To verify a signature, the proxy will query the sender's DNS for their public key. If the message has a valid signature, the message is "verified." The inbound proxy can be configured to reject messages that fail to verify (though this is not recommended at this time). Otherwise, it will add a header to the message indicating the result of the verification.
Behavior of the inbound proxy is controlled using the following arguments:
To manually start the inbound proxy:
dkimproxy.in 127.0.0.1:10025 127.0.0.1:10026This starts the proxy listening on port 10025 and transmitting to port 10026.
Now you need to configure your mail server to pass incoming messages through the dkimproxy.in service on port 10025 for verification.
Please check the Frequently Asked Questions page if you have a problem. It is possible there is already a known solution to your problem.
Here I will try to document unresolved issues with Mail::DKIM or DKIMproxy.
If you notice any problems, let me know so I can add them to this list.
The following email address is configured to auto-respond with DKIM verification results. It uses the dkimproxy implementation as found on this web page.
For best results, place the words dkim and/or test in the subject of your message. This will reduce the likelihood of your message getting quarantined by my spam filters.
Note 1: the above auto-responder responds to the SMTP envelope sender; i.e. it ignores contents of From: and Reply-to: headers when making its reply.
Note 2: the above auto-responder deals with the validity of the signature itself. It does NOT apply any signing policies.
The following auto-responders are offered by others, and will test your signed messages against other implementations:
If you need help with dkimproxy, or with the Perl module (Mail::DKIM), feel free to use one of the following tools:
Please also post comments, suggestions, and patches, if you have any. I will respond as I am able.
You can also email me directly (jlong@messiah.edu), but be warned I sometimes take a while to respond to email. If it's about something others would know or be interested in, please use the SourceForge-provided forum or mailing list.