MailScanner fail to detect any attachment on RHEL6.3

Ling Shi ling at unimelb.edu.au
Sun Feb 10 23:55:06 GMT 2013


Hi,

I recently moved our mail server (RHEL4.9/Postfix 2.2.10/MailScanner 
4.74.16) to a new machine (RHEL6.3/Postfix 2.6.6/MailScanner 4.84.5). 
After that, MailScanner fails to detect any attachment, ie no 
Filename/Filetype check at all.

By closely looking at /var/spool/MailScanner/incoming/<pid>, I found 
there're only <message-id>, <message-id>.header files, but empty 
<message-id> subdirectory, which means MIME::Parser doesn't work.

`MailScanner -v` output:

-----------------------------
# MailScanner -v
Running on
Linux selene.ms.unimelb.edu.au 2.6.32-279.22.1.el6.x86_64 #1 SMP Sun Jan 
13 09:21:40 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
This is Red Hat Enterprise Linux Server release 6.3 (Santiago)
This is Perl version 5.010001 (5.10.1)

This is MailScanner version 4.84.5
Module versions are:
1.00    AnyDBM_File
1.30    Archive::Zip
   :
3.08    MIME::Base64
5.504   MIME::Decoder
5.504   MIME::Decoder::UU
5.504   MIME::Head
5.504   MIME::Parser
3.08    MIME::QuotedPrint
5.504   MIME::Tools
   :
-----------------------------

I've tried to feed Postfix queue file (take from 
/var/spool/postfix/hold) to MailScanner on the old RHEL4 server, which 
generates correct <message-id>/<attachment-file>. So Postfix isn't the 
problem.

I also tried feed the queue file to

-----------------------------
#! /usr/bin/perl
use MIME::Parser;
my $parser = new MIME::Parser;
$parser->parse(\*STDIN)};
-----------------------------

but that didn't work, sure my perl knowledge is very basic.

Could someone please help write me a perl script, which is similar to 
sub Explode {} in MailScanner::Message? The script takes Postfix queue 
file as import, the output will be like those in 
/var/spool/MailScanner/incoming/<pid>, ie

<message-id>/<attachment>  (if any)
<message-id>
<message-id>.header

I'll use this script on both RHEL4 and RHEL6, hoping generate different 
result, so I can ask Redhat support team whether RHEL6's perl is at fault.

Thank you.

-- 
Regards,
Ling Shi
(UnixSysad, MS, UniMelb)


More information about the MailScanner mailing list