External TNEF decoding bug in MailScanner 4.84.3
Jeremy McSpadden
jeremy at fluxlabs.net
Tue Sep 27 19:09:55 IST 2011
Microshaft
--
Jeremy McSpadden
On Sep 27, 2011, at 1:05 PM, "Martin Hepworth" <maxsec at gmail.com<mailto:maxsec at gmail.com>> wrote:
Side question is who the heck is still using this encoding on emails ... Its 2011 not 1991 ????
Martin
On Tuesday, 27 September 2011, Randal, Phil <prandal at herefordshire.gov.uk<mailto:prandal at herefordshire.gov.uk>> wrote:
> Hi folks,
>
>
>
> The following change to TNEF.pm (from 4.83.5 to 4.84.3) breaks external TNEF decoding:
>
>
>
>
>
> @@ -228,7 +228,9 @@
>
> my($dir, $tnefname, $message, $perms, $owner, $group, $change) = @_;
>
>
>
> # Create the subdir to unpack it into
>
> - my $unpackdir = "tnef.$$";
>
> + #my $unpackdir = "tnef.$$";
>
> + my ($tmpfh, $unpackdir) = tempfile("tnefXXXXXX", TMPDIR => $dir, UNLINK => 0);
>
> + $dir =~ s,^.*/,,;
>
> $unpackdir = $message->MakeNameSafe($unpackdir, $dir);
>
> unless (mkdir "$dir/$unpackdir", 0777) {
>
> MailScanner::Log::WarnLog("Trying to unpack %s in message %s, could not create subdirectory %s, failed to unpack TNEF message", $tnefname, $message->{id},
>
>
>
> Error logged is:
>
>
>
> Sep 27 15:36:20 mx0 MailScanner[17000]: Expanding TNEF archive at /var/spool/MailScanner/incoming/17000/p8REaJo0023344/winmail.dat
>
> Sep 27 15:36:20 mx0 MailScanner[17000]: Trying to unpack nwinmail.dat in message p8REaJo0023344, could not create subdirectory p8REaJo0023344//tnefiOXxho, failed to unpack TNEF message
>
> Sep 27 15:36:20 mx0 MailScanner[17000]: Corrupt TNEF winmail.dat that cannot be analysed in message p8REaJo0023344
>
>
>
> Changing to internal decoder fixes this.
>
>
>
> All worked fine with external decoder in 4.83.5.
>
>
>
> Cheers,
>
>
>
> Phil
>
> --
> Phil Randal | Infrastructure Engineer
> NHS Herefordshire & Herefordshire Council | Deputy Chief Executive's Office | I.C.T. Services Division
> Thorn Office Centre, Rotherwas, Hereford, HR2 6JT
> Tel: 01432 260160
>
>
>
> “Any opinion expressed in this e-mail or any attached files are those of the individual and not necessarily those of Herefordshire Council, Herefordshire Primary Care Trust or 2gether NHS Foundation Trust. You should be aware that Herefordshire Council, Herefordshire Primary Care Trust & 2gether NHS Foundation Trust monitors its email service. This e-mail and any attached files are confidential and intended solely for the use of the addressee. This communication may contain material protected by law from being passed on. If you are not the intended recipient and have received this e-mail in error, you are advised that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you have received this e-mail in error please contact the sender immediately and destroy all copies of it. Please consider the environment before printing this e-mail.”
--
--
Martin Hepworth
Oxford, UK
--
MailScanner mailing list
mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscanner.info>
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20110927/7c961684/attachment.html
More information about the MailScanner
mailing list