[Mimedefang] Re: Making an md5 key of the body
David F. Skoll
dfs at roaringpenguin.com
Tue Mar 27 08:56:35 EST 2007
Danny Kjærgaard wrote:
> The inputmsg cantains the header too, if i understood it correct, and the
> only thing i need is the body.
Ah, I see. Then you can just read past the headers (read until you hit
a blank line) and then MD5-sum the rest.
> 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.
:-) More than 100%? (I know what you mean, but it sounds funny...)
Unfortunately, if you only want the body and not the headers, you're
going to have to remove the headers from INPUTMSG before passing them
to your md5-generator.
> I did however try adding this under filter_end and i tells me that the path
> to the body files isn't there.
Right, because filter_end gets the top-level entity. You need to specifically
MD5-sum the file "./INPUTMSG" (after skipping the headers).
More information about the MIMEDefang