MailScanner Upgrade Caused some Problems

jenlepp

Well-Known Member
Jul 4, 2005
116
2
168
Liberty Hill, TX
cPanel Access Level
DataCenter Provider
I have four servers using Chirpy's frontend/backend MailScanner installation, and yesterday I clicked all the buttons to upgrade to the latest software, as well as install the latest frontend. I checked everything over and it seemed to be working fine.

This morning I got a ticket from a customer that his mail wasn't being tagged. When I went in to check, MailScanner WHM frontend showed disabled. When I tried to enable it, it refused to be enabled. When I checked other servers, all four of those Frontends also showed that MailScanner was disabled, though if you check the process, the process is running.

Maillog was showing entried over and over:
Jan 12 10:21:55 blastoid MailScanner[22791]: MailScanner E-Mail Virus Scanner version 4.57.6 starting...
Jan 12 10:21:55 blastoid MailScanner[22791]: Read 748 hostnames from the phishing whitelist
Jan 12 10:21:55 blastoid MailScanner[22791]: Config: calling custom init function MailWatchLogging
Jan 12 10:21:55 blastoid MailScanner[22791]: Started SQL Logging child
Jan 12 10:21:55 blastoid MailScanner[22791]: Using SpamAssassin results cache
Jan 12 10:21:55 blastoid MailScanner[22791]: Connected to SpamAssassin cache database

But it never actually got to a point that it was reading the mail. Incoming and outgoing queues show:

Incoming Mail Queue (mail to be processed by MailScanner) 141 messages
Outgoing Mail Queue (mail to be processed by Exim for delivery) 141 messages

identical message numbers, which isn't what usually happens.

Jan 12 09:16:34 warturtle MailScanner[10964]: Unrecognised keyword "virusscannertimeout" at line 530
Jan 12 09:16:34 warturtle MailScanner[10964]: Warning: syntax errors in /usr/mailscanner/etc/MailScanner.conf.

I tried to reinstall from the command line, no dice. I took clamav off, and deleted everything regarding clamav off the server, and tried to restart and I get farther:

Jan 12 09:16:39 warturtle MailScanner[10980]: MailScanner E-Mail Virus Scanner version 4.57.6 starting...
Jan 12 09:16:39 warturtle MailScanner[10980]: Syntax error(s) in configuration file:
Jan 12 09:16:39 warturtle MailScanner[10980]: Unrecognised keyword "virusscannertimeout" at line 530
Jan 12 09:16:39 warturtle MailScanner[10980]: Warning: syntax errors in /usr/mailscanner/etc/MailScanner.conf.
Jan 12 09:16:39 warturtle MailScanner[10980]: Read 719 hostnames from the phishing whitelist
Jan 12 09:16:39 warturtle MailScanner[10980]: Config: calling custom init function MailWatchLogging
Jan 12 09:16:39 warturtle MailScanner[10980]: Started SQL Logging child
Jan 12 09:16:39 warturtle MailScanner[10980]: Using SpamAssassin results cache
Jan 12 09:16:39 warturtle MailScanner[10980]: Connected to SpamAssassin cache database
Jan 12 09:16:41 warturtle MailScanner[10980]: Using locktype = posix
Jan 12 09:16:41 warturtle MailScanner[10980]: Creating hardcoded struct_flock subroutine for linux (Linux-type)

But still, no dice. It won't scan. Got rid of the syntax error:

an 12 10:10:04 warturtle MailScanner[1910]: MailScanner E-Mail Virus Scanner version 4.57.6 starting...
Jan 12 10:10:05 warturtle MailScanner[1910]: Read 719 hostnames from the phishing whitelist
Jan 12 10:10:05 warturtle MailScanner[1910]: Config: calling custom init function MailWatchLogging
Jan 12 10:10:05 warturtle MailScanner[1910]: Started SQL Logging child
Jan 12 10:10:05 warturtle MailScanner[1910]: Using SpamAssassin results cache
Jan 12 10:10:05 warturtle MailScanner[1910]: Connected to SpamAssassin cache database
Jan 12 10:10:07 warturtle MailScanner[1910]: Using locktype = posix
Jan 12 10:10:07 warturtle MailScanner[1910]: Creating hardcoded struct_flock subroutine for linux (Linux-type)
Jan 12 10:10:09 warturtle MailScanner[1925]: MailScanner E-Mail Virus Scanner version 4.57.6 starting...
Jan 12 10:10:10 warturtle MailScanner[1925]: Read 719 hostnames from the phishing whitelist
Jan 12 10:10:10 warturtle MailScanner[1925]: Config: calling custom init function MailWatchLogging
Jan 12 10:10:10 warturtle MailScanner[1925]: Started SQL Logging child
Jan 12 10:10:10 warturtle MailScanner[1925]: Using SpamAssassin results cache
Jan 12 10:10:10 warturtle MailScanner[1925]: Connected to SpamAssassin cache database
Jan 12 10:10:12 warturtle MailScanner[1925]: Using locktype = posix
Jan 12 10:10:12 warturtle MailScanner[1925]: Creating hardcoded struct_flock subroutine for linux (Linux-type)

And this is all I get, over and over - no scanning at all, MailScanner showing disabled, and whether I restart it or try to enable it, I'm not seeing it scan anything at all.

And this is all I get, over and over - no scanning at all, MailScanner showing disabled, and whether I restart it or try to enable it, I'm not seeing it scan anything at all, but shows a process running. No errors in maillog, nothing that clearly marks what the problem is that I can see.

Has anyone seen anything like this with their install, or have any suggestions?
 
Last edited:

lloyd_tennison

Well-Known Member
Mar 12, 2004
697
1
168
Did you try the backup copy of MailScanner.conf that Chirpy's install keeps when it updates?
 

adept2003

Well-Known Member
Aug 11, 2003
281
0
166
~ "/(extra|special)/data"
Jan 12 09:16:34 warturtle MailScanner[10964]: Unrecognised keyword "virusscannertimeout" at line 530
Jan 12 09:16:34 warturtle MailScanner[10964]: Warning: syntax errors in /usr/mailscanner/etc/MailScanner.conf.
This is probably the important clue. Try commenting out the line "virusscannertimeout", then retry.

Ps. Is this what that line is supposed to say...?
# The maximum length of time the commercial virus scanner is allowed to run
# for 1 batch of messages (in seconds).
Virus Scanner Timeout = 300
 

adept2003

Well-Known Member
Aug 11, 2003
281
0
166
~ "/(extra|special)/data"
I had the same problem recently. I had remembered at one time it said after upgrading is go to the mailscanner config and simply save it again and restart. That solved it for me and it started working again.
Ah, that makes perfect sense - it *should* rebuild your mailscanner.conf file. Great thinking :)
 

jenlepp

Well-Known Member
Jul 4, 2005
116
2
168
Liberty Hill, TX
cPanel Access Level
DataCenter Provider
Is this related to the Liquidweb problem posted over at the Configserver website today? http://www.configserver.com/blog/index.php?itemid=162#more
Yeah, we were one of the ones with the problem. I wound up just taking clamav off altogether because it was getting way too frustrating to deal with repeatedly. It wasn't the first time that it wound up doing that.

Now, I'm having a problem with two servers for three nights running stalling MailScanner. Restarting at the command line gets everything running. But restarting at the MSFE, or when MS restarts itself to prevent resource leaks, or who the heck knows, is causing everything to pile up and not process because MailScanner is just continually restarting over and over again and not actually processing any mail. But just on two servers. The other two are fine.

When this works, it works well, but when something automatic updates and screws with it, it's a real pain in the rear.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
That issue (not restarting) is actually a bug somewhere in x86_64 Linux - the latest version of our script ought to help the issue, if not, edit /usr/mscpanel/mscheck.pl and change the MailScanner restart to a reload.
 

jenlepp

Well-Known Member
Jul 4, 2005
116
2
168
Liberty Hill, TX
cPanel Access Level
DataCenter Provider
So far whatever you did fixed it and I haven't seen any problems beyond that night - what was bizarre was it wasn't happening on the other two servers that are 64 bit, too. [shrug] I don't get it, but it seems to have returned to normal.

I really regret the upgrade to 64 bit in a few ways. The problem's it's causing are getting to be a real pain in the rear.

Thanks again for the fix!