TNEF taking up 86% of 512MB of ram

Patterson, S R S.R.Patterson at soton.ac.uk
Thu Dec 6 09:59:16 GMT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Set a maximum size on TNEF extraction (-x or --maxsize switch).  TNEF
attempts to allocate enough memory to extract the entire attachment
based
upon how big the TNEF header says the parts are - and for some reasons
some
TNEF headers claim their parts are many hundreds of megabytes in size
when
they quite clearly are not.

That's exactly what prompted me to put in the --maxsize switch - and
yes, I'm
still planning to one day write a fix that involves not
pre-malloc()ing all
of the memory!

- --
Steven Patterson, MSci ---------------------- Tel: +44 (0) 2380 595810
|       Electronic Information Systems Support and Development       |
|         Computing Services, University of Southampton, UK.         |
+------ PGP Public Key: http://www.soton.ac.uk/~srp/pubkey.asc ------+
......                                                          ......
..       Conviction is a bigger enemy of the truth than lies.       ..
......                                                          ......

> -----Original Message-----
> From: Andrew Hoying [mailto:andrewh at CQG.COM]
> Sent: 06 December 2001 02:37
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: TNEF taking up 86% of 512MB of ram
>
>
> Is there any reason why TNEF would suddenly take up over
> 400MB of ram to
> process an attachment that is only a few kilobytes in size?
> This slowed my
> whole server to a crawl and caused mail delivery to stop for
> 20 minutes
> today. I tried to recreate this event, but of the 6 e-mails
> that could have
> caused it, I only recovered 4 and only one had a winfile.dat
> attachment. I
> sent the e-mail through the scanner a few times, but it never
> had the same
> behavior.
>
> Any help is greatly appreciated. I have the tnef timeout set
> to 120 seconds,
> but mailscanner didn't seem to stop the process after the timeout.
>
> Thanks,
> Andrew Hoying
>

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPA9Bba2fOiTs5+WvEQLsoQCgpSQqHzsFeSaoIYnwChMp+76dhMYAoKUw
wCVvyR4aQf61DgvEpMiq3n2Q
=u7gv
-----END PGP SIGNATURE-----



More information about the MailScanner mailing list