MailScanner failed - Email service dead

wa4fat

Well-Known Member
Dec 30, 2001
51
1
308
Good morning

MailScanner has failed on one of my boxes, and has effectievly shut down all email service. Could someone give me any suggestions on how to disable the MailScanner service to restore email, while I trouble shoot the issue?

Here is the error message on an attempted MailScanner restart:

Reloading MailScanner workers:
Starting MailScanner daemons:
MailScanner: Can't locate Filesys/Df.pm in @INC (@INC contains: /usr/mailscanner/lib/5.8.3/i386-linux-thread-multi /usr/mailscanner/lib/5.8.3 /usr/mailscanner/lib/i386-linux-thread-multi /usr/mailscanner/lib/5.8.2 /usr/mailscanner/lib/5.8.1 /usr/mailscanner/lib/5.8.0 /usr/mailscanner/lib /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /usr/mailscanner/lib/5.8.3/i386-linux-thread-multi /usr/mailscanner/lib/5.8.3 /usr/mailscanner/lib/i386-linux-thread-multi /usr/mailscanner/lib/5.8.2 /usr/mailscanner/lib/5.8.1 /usr/mailscanner/lib/5.8.0 /usr/mailscanner/lib) at /usr/mailscanner/bin/MailScanner line 66.
BEGIN failed--compilation aborted at /usr/mailscanner/bin/MailScanner line 66.

Thanks very much in advcance!

Bill
 

wa4fat

Well-Known Member
Dec 30, 2001
51
1
308
Disabled MailScanner

As a follow up: I disabled MailScanner completely, to get email flowing again.

rm /etc/exim_outgoing.conf
/scripts/buildeximconf
service exim restart

I'll post the resolution to all this when I'm able to restore MailScanner to service.

BTW: MailScanner is an outstanding and invaluable addition to our servers ... highly, highly recommended.
 

mctDarren

Well-Known Member
Jan 6, 2004
665
4
168
New Jersey
cPanel Access Level
Root Administrator
You might want to make sure Perl is updated, some older versions creeping in there, and get all up to 5.8.7 - you can do it from layer1 using the perlinstaller script.
 

bornonline

Well-Known Member
Nov 19, 2004
139
0
166
Earth
I had the same problem last week. I had to reinstall mailscanner and clamAV to get it working again.
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,221
4
193
Minneapolis, MN
wa4fat said:
Here is the error message on an attempted MailScanner restart:

Reloading MailScanner workers:
Starting MailScanner daemons:
MailScanner: Can't locate Filesys/Df.pm in @INC (@INC
You need to upgrade Perl to 5.8.7, first, then re-install MailScanner.
 

wa4fat

Well-Known Member
Dec 30, 2001
51
1
308
Solution + info

Thanks to those who pointed me to the Perl issue, and the need to upgrade to the latest version. This solved our MailScanner issue.

Should you need to upgrade your version of Perl:

wget http://layer1.cpanel.net/perl587installer.tar.gz
tar xfz perl587installer.tar.gz
cd perl587installer
./install

After this is done, run:

/scripts/upcp

You can also run the following to ensure that all the necessary modules were reinstalled:

/usr/local/cpanel/bin/checkperlmodules

Once you have completed the upgrade, you can check the perl version (perl -v) to ensure that this was properly installed.



As an aside, our server had over 25K emails backed up for delivery, so I disabled MailScanner to lessen the load a bit and facilitate delivery. Man oh man how our clients cried when they saw all those unfiltered emails. This proved to be a good opportunity to illustrate the wonderful effectiveness of MailScanner.

Should you ever need to temporarily disable MailScanner filtering, you can do so in the config file:

/usr/mailscanner/etc/MailScanner.conf

Change this line: Always Looked Up Last = &MailWatchLogging
to
#Always Looked Up Last = &MailWatchLogging to

and change Scan Message = yes
to
Scan Messages = no

Save the file and restart MailScanner with: service MailScanner restart

All the best -- Bill
 

wa4fat

Well-Known Member
Dec 30, 2001
51
1
308
Additional Info

Note that a perl upgrade has the potential to break various perl modules ... including ClamAV, which will also cause MailScanner to fail. Be sure to run:

/usr/local/cpanel/bin/checkperlmodules

or reinstall ClamAV