Skip Menu |

This queue is for tickets about the Mail-DKIM CPAN distribution.

Report information
The Basics
Id: 52703
Status: resolved
Priority: 0/
Queue: Mail-DKIM

People
Owner: jason [...] long.name
Requestors: david.morel [...] amakuru.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.37
Fixed in: (no value)



Subject: Missing sample_mime_lite.pl
The file sample_mime_lite.pl is mentioned in the Changelog but is absent from the distribution
On Sat Dec 12 05:37:19 2009, david.morel@amakuru.net wrote: Show quoted text
> The file sample_mime_lite.pl is mentioned in the Changelog but is > absent from the distribution
Oops! Ok, I just uploaded version 0.37_5 which should include that file. You can also browse by SVN repository here http://dkimproxy.svn.sourceforge.net/viewvc/dkimproxy/Mail-DKIM/trunk/ and get the file from there. Thanks for reporting this.
Thanks for the upload! Here's the version I had put together in the meantime, which seems to work (probably because it uses &field_order, which ensures the DKIM header stays on top). However, patching MIME::Lite directly to support this header (and not lowercase it btw) is probably a better option. #!/usr/bin/env perl use strict; use warnings; use MIME::Lite; use IO::File; use Mail::DKIM::Signer; my $msg = MIME::Lite->new( From => 'sender@domain.tld', To => 'recipient@other.tld', Subject => 'Test de message (DKIM)', Data => "Doses this work at all?" ); my $fh = IO::File->new_tmpfile; $msg->print($fh); $fh->seek( 0, 0 ); my $dkim = Mail::DKIM::Signer->new( Algorithm => "rsa-sha1", Method => "relaxed", Domain => "my.domain.com", Selector => "key1", KeyFile => "my-domain.dkim.priv.key", ); $dkim->load($fh); my $signature = $dkim->signature; ($signature = $dkim->signature->as_string) =~ s/^DKIM-Signature: //; $fh->close; # Header is lowercased by M:Lite, could be an issue $msg->field_order( 'Dkim-Signature' ); $msg->add('Dkim-Signature' => $signature ); print $msg->as_string; $msg->send_by_smtp('my.smtp.com');