[Mimedefang] Re: Making an md5 key of the body

Danny Kj æ rgaard danny at resennet.dk
Tue Mar 27 08:09:55 EST 2007




On 3/27/07 2:59 PM, in article 4609152D.3030104 at roaringpenguin.com, "David
F. Skoll" <dfs at roaringpenguin.com> wrote:

> Danny Kjærgaard wrote:
> 
>>     chop($md5body=`md5 -q \"$bodypath\"`);
> 
> Aiieee!!!!!
> 
> If you see `this` in a production Perl script, it's probably wrong.
> Use the Digest::MD5 Perl module instead and compute the MD5SUM of
> INPUTMSG.
> 
The inputmsg cantains the header too, if i understood it correct, and the
only thing i need is the body.

The Digest::MD5 module i slower, i did some benchmarks and using the
userland MD5 were faster, more than 100% if i recall it correct.

>>     md_syslog('notice',"Md5body ($md5body $Subject [$#Recipients
>> @Recipients])");
> 
> Use scalar(@Recipients) instead; read the perlintro(1) man page.
> 
> And your function belongs in filter_end, not filter -- read the
> mimedefang-filter man page.
> 
> --
> David.

Yeah, sorry about the $# instead of scalar, didnt read the output correct.

I did however try adding this under filter_end and i tells me that the path
to the body files isn't there.

Cheers.
-Danny




More information about the MIMEDefang mailing list