[Mimedefang] Making an md5 key of the body

Chris Myers chris at by-design.net
Wed Mar 28 10:48:07 EDT 2007

> On Tue, 27 Mar 2007, Chris Myers wrote:
> [... code snippet ...]
> Your code snippet looks like copied from a production server; I wonder how 
> much time the calculation adds to the mail scanning process, you don't get 
> any timeouts from sending MTAs, do you?

Not unless some thoughtless person sends a (multi) hundred megabyte 
attachment, in which case other parts of MIMEDefang are sucking up far more 
CPU than a simple little MD5 calculation.

The average message size is about 6-10KB (getting larger due to image spam), 
so the time to calculate the hash of a message is usually microscopic.  And 
if you think about it for a while, you can use the hashes as a key to 
information calculated about previous (identical) messages so you don't have 
to calculate that information again.

Chris Myers
Networks By Design 

More information about the MIMEDefang mailing list