Error expanding TNEF attachments in new 4.84.5-2

Adri Koppes adrik at salesmanager.nl
Wed Mar 14 09:21:08 GMT 2012


Andrew,

I guess I must have missed that patch.
I have applied it and will see if it solves the TNEF problem.

Thanks,

Adri.

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Randal, Phil
Sent: dinsdag 13 maart 2012 21:00
To: 'MailScanner discussion'
Subject: RE: Error expanding TNEF attachments in new 4.84.5-2

Andrew Kissa posted this patch to the list on Feb 22nd:

diff --git a/lib/MailScanner/TNEF.pm b/lib/MailScanner/TNEF.pm index 9cc9aa2..c49a079 100644
--- a/lib/MailScanner/TNEF.pm
+++ b/lib/MailScanner/TNEF.pm
@@ -229,8 +229,7 @@ sub ExternalDecoder {

   # Create the subdir to unpack it into
   #my $unpackdir = "tnef.$$";
-  my ($tmpfh, $unpackdir) = tempfile("tnefXXXXXX", TMPDIR => $dir, UNLINK => 0);
-  $dir =~ s,^.*/,,;
+  my $unpackdir = tempdir("tnefXXXXXX");
   $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},


That should fix it.

Cheers,

Phil


-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Kevin Kobb
Sent: 13 March 2012 14:54
To: MailScanner discussion
Subject: Re: Error expanding TNEF attachments in new 4.84.5-2

On 3/13/2012 10:34 AM, Adri Koppes wrote:
> Kevin,
>
> I also recently installed tnef 1.4.9.
> But the new tnef 1.4.9 works fine with the older MailScanner 4.83.5.
> Also the error seems to be generated by MailScanner in TNEF.pm when it 
> tried to create a temporary subdirectory, before the external tnef 
> program is run.
>
> Adri.
>

Interesting. I'll have to experiment with this a little more when I get a chance. I just did this a couple days ago, so I haven't had a lot of time to look at it yet.
--
MailScanner mailing list
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!
“Any opinion expressed in this e-mail or any attached files are those of the individual and not necessarily those of Hoople Ltd. You should be aware that Hoople Ltd. 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.


More information about the MailScanner mailing list