Problem winmail.dat and TNEF
M A Young
m.a.young at durham.ac.uk
Thu Feb 23 00:13:28 GMT 2012
On Wed, 22 Feb 2012, Jeff Mills wrote:
> My code looks like this now:
> # Create the subdir to unpack it into
> #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},
> "$dir/$unpackdir");
> return 0;
If I have read the patch correctly you shouldn't have the 2 lines marked **
Michael Young
More information about the MailScanner
mailing list