Copyright 2007 Infire Ltd. All rights reserved. See the README file for an overview of perlfilter-dkim. Perlfilter-dkim Requirements ============================ Perlfilter-dkim is written in Perl. It requires the following software: * Perl >= 5.8.5 * Courier-MTA >= 0.52.1 * OpenSSL >= 0.9.7a * Mail::DKIM >= 0.26 * File::Copy >= 2.09 * File::Temp >= 0.17 Basic Installation ================== To install this filter: 1. Install required software. perl -MCPAN -e 'install Mail::DKIM' perl -MCPAN -e 'install File::Copy' perl -MCPAN -e 'install File::Temp' 2. Set up DomainKeys and/or DKIM, or jump to step 3 to continue. The following is quick and dirty. For further information see: http://www.elandsys.com/resources/sendmail/domainkeys.html http://www.elandsys.com/resources/sendmail/dkim.html http://www.dkim.org/ http://antispam.yahoo.com/domainkeys a) Create private keys: openssl genrsa -out rsa.dk.private 768 openssl genrsa -out rsa.dkim.private 1024 b) Create public keys: openssl rsa -in rsa.dk.private -out rsa.dk.public -pubout -outform PEM openssl rsa -in rsa.dkim.private -out rsa.dkim.public -pubout -outform PEM c) Set required DNS entires: dk_selector._domainkey.example.com. IN TXT "k=rsa; t=y; p=MEwwPQRJK" dkim_selector._domainkey.example.com. IN TXT "v=DKIM1; h=sha1; k=rsa; g=*; s=email; t=y; p=MEwwPQRJKF" _domainkey.example.com. IN TXT "t=y; o=~" _policy._domainkey.example.com. IN TXT "t=y; o=~" 3. Move perlfilter-dkim.pl and pfdkim-config.pl to your preferred location. Default is /usr/local/perlfilter-dkim/ 4. Edit perlfilter-dkim.pl so that $CONFIGURATION_FILE contains the path and the filename of pfdkim-config.pl 5. Edit pfdkim-config.pl until it matches your desired configuration. 6. Set pfdkim-config.pl and perlfilter-dkim.pl readable by Courier mail server user and group: chown courier:courier pfdkim-config.pl perlfilter-dkim.pl chmod 640 pfdkim-config.pl perlfilter-dkim.pl 7. Set the private keys you created on step 2 readable by Courier mail user and group. 8. Activate perlfilter in Courier-MTA: a) Edit /etc/filters/perlfilter file to contain the full location and filename of perlfilter-dkim.pl and nothing else b) Edit /etc/filters/perlfilter-mode to contain the word "all" and nothing else. c) Activate perlfilter: ln -s /libexec/filters/perlfilter /etc/filters/active/perlfilter d) Start/restart courierfilter: /sbin/courierfilter stop /sbin/courierfilter start