[Mimedefang] Making an md5 key of the body

Danny Kj=?ISO-8859-1?B?5g==?=rgaard danny at resennet.dk
Tue Mar 27 08:45:09 EDT 2007


Hi, 

I would like to make an md5 key of all bodys that comes throu my
mailscanner. I'm writing these to the log. I have the followering in my
filter()

    my $bh = $entity->bodyhandle();
    my $bodypath = $bh->path();
    chop($md5body=`md5 -q \"$bodypath\"`);
    md_syslog('notice',"Md5body ($md5body $Subject [$#Recipients
@Recipients])");

This works fine, but on most mails i get 2-3 lines in the log, like this:
... mimedefang.pl[17367]: Md5body (f53ed030ee12dff8ca5af9eb57f6e1ce Of
itself candace [0 <xxx at xxx>])
... mimedefang.pl[17367]: Md5body (3253d340f3ba4ae10412788977542273 Of
itself candace [0 <xxx at xxx>])

Now the number of Recipients is 0 that i dont understand, why is there two
different md5 keys in the log?

How might i get one line in the log with an md5 key of the entire body?



Cheers
-Danny





More information about the MIMEDefang mailing list