I had previously setup a submission port using dkimproxy separate from 
amavis to test DKIM signing and verification, and it worked well. 
However once I found out that 2.6.2 implemented DKIM as well without the 
problems of breaking signatures after spam and virus scanning, I got all 
giddy and decided to go for it.

I read the instructions in the release notes and the user documentation 
on the website, but apparently somewhere along the way I've gone wrong. 
I've beaten myself black and blue going over my amavis.conf file, but I 
still don't see the DKIM headers in any messages I send.

I've tried disabling my old DKIM port that I used with dkimproxy to see 
if that was causing a problem, but still no luck. Originally I was not 
using the bysender map, but I put it in after the first several 
configuration attempts did not work. Below are the lines from my 
amavisd.conf file:

################################################################
$enable_dkim_verification = 1;  # enable DKIM signatures verification
$enable_dkim_signing = 1;    # load DKIM signing code, keys defined by 
dkim_key
dkim_key('mydomain.com', 'myselector', '/path/to/my/private.key.pem');
@dkim_signature_options_bysender_maps = ( {
 '.' => { a => 'rsa-sha1', c => 'relaxed/simple', ttl => 30*24*3600 },});
################################################################


Running `amavisd showkeys` correctly shows the public key in my DNS:
################################################################
; key#1, domain mydomain.com, /path/to/my/private.key.pem
myselector._domainkey.mydomain. 3600 TXT (
 "v=DKIM1; p="
 "a whole bunch of public key stuff here")
################################################################


Running `amavisd testkeys` comes back as passed:
################################################################
TESTING#1: myselector._domainkey.mydomain.com => pass
################################################################


With logging level 2 turned on for amavis, I get logs like the following:
################################################################
Feb 11 17:43:57 mail amavis[11512]: (11512-02) TempDir::prepare: 
directory /var/amavis/tmp/amavis-20090211T174237-11512 has 2 subdirectories
Feb 11 17:43:57 mail amavis[11512]: (11512-02) ESMTP::10024 
/var/amavis/tmp/amavis-20090211T174237-11512: <[email protected]> 
-> <[email protected]> SIZE=602 Received: from 
mail.mydomain.com ([127.0.0.1]) by localhost (mail.mydomain.com 
[127.0.0.1]) (amavisd-new, port 10024) with ESMTP for 
<[email protected]>; Wed, 11 Feb 2009 17:43:57 -0500 (EST)
Feb 11 17:43:57 mail amavis[11512]: (11512-02) smtp connection cache, 
dt: 76.2, state: 1
Feb 11 17:43:57 mail amavis[11512]: (11512-02) smtp connection cache, 
dt: 76.2 -> disabling
Feb 11 17:43:57 mail amavis[11512]: (11512-02) Checking: ePFvYp5QhcrF 
[76.161.101.114] <[email protected]> -> <[email protected]>
Feb 11 17:43:57 mail amavis[11512]: (11512-02) cached 
d8e8fca2dc0f896fd7cb4cb0031ba249 from <[email protected]> (1,0)
Feb 11 17:43:57 mail amavis[11512]: (11512-02) p001 1 Content-Type: 
text/plain, size: 5 B, name:
Feb 11 17:43:57 mail amavis[11512]: (11512-02) FWD via SMTP: 
<[email protected]> -> <[email protected]>,BODY=7BIT 250 
2.6.0 Ok, id=11512-02, from MTA([127.0.0.1]:10025): 250 Ok: queued as 
92C273A7C00
Feb 11 17:43:57 mail amavis[11512]: (11512-02) Passed CLEAN, 
[76.161.101.114] [76.161.101.114] <[email protected]> -> 
<[email protected]>, Message-ID: 
<[email protected]>, mail_id: ePFvYp5QhcrF, Hits: -2.547, 
size: 602, queued_as: 92C273A7C00, 192 ms
Feb 11 17:43:57 mail amavis[11512]: (11512-02) TIMING [total 196 ms] - 
SMTP greeting: 2 (1%)1, SMTP EHLO: 1 (0%)1, SMTP pre-MAIL: 1 (0%)2, SMTP 
pre-DATA-flush: 3 (1%)3, SMTP DATA: 1 (0%)3, check_init: 1 (0%)4, 
digest_hdr: 1 (0%)4, digest_body_dkim: 0 (0%)4, gen_mail_id: 1 (1%)5, 
mime_decode: 9 (5%)10, get-file-type1: 27 (14%)23, decompose_part: 1 
(1%)24, parts_decode: 0 (0%)24, check_header: 2 (1%)25, spam-wb-list: 2 
(1%)26, SA parse: 4 (2%)28, SA check: 111 (56%)84, update_cache: 7 
(4%)88, decide_mail_destiny: 1 (0%)88, fwd-connect: 4 (2%)91, 
fwd-mail-pip: 3 (1%)92, fwd-rcpt-pip: 0 (0%)92, fwd-data-chkpnt: 0 
(0%)92, write-header: 1 (0%)92, fwd-data-contents: 0 (0%)92, 
fwd-end-chkpnt: 3 (1%)94, prepare-dsn: 1 (0%)94, main_log_entry: 8 
(4%)98, update_snmp: 2 (1%)99, SMTP pre-response: 1 (0%)99, SMTP 
response: 0 (0%)99, unlink-1-files: 0 (0%)100, rundown: 1 (0%)100
#################################################################


Currently I'm using Postfix 2.1.5. Everything else with amavis-new is 
working as far as spam filtering and virus checking go with that version 
of postfix, but I'm open to suggestions.

Thanks for reading all of this!

Terry




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to