#1 (permalink)  
Old 03-07-2004, 12:36 PM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Post HOWTO: Upgrade layer1 MailScanner

Hi,

I recently upgraded our MailScanner installations to the latest version (MailScanner-4.32.5-1). The following procedure is for use after having used the http://layer1.cpanel.net mailscanner add-on.

You use the following completely at your own risk. Don't come running to me if it breaks everything!

Code:
/scripts/perlinstaller Net::CIDR
/scripts/perlinstaller Archive::Zip
/scripts/perlinstaller Compress::Zlib
/scripts/perlinstaller Convert::BinHex

wget http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/MailScanner-install-4.32.5-1.tar.gz
tar -xzf MailScanner-install-*.tar.gz
rm -Rf /usr/mailscanner.new/
rm -Rf /usr/mailscanner.old/
cd MailScanner-install-*/perl-tar
tar -xzf MailScanner-*.tar.gz
mv -f MailScanner-*/ /usr/mailscanner.new
cd ../..
rm -Rf MailScanner-install-*
cd /usr/mailscanner/etc/
mv -f MailScanner.conf.new MailScanner.conf.old # MailScanner.conf.new may not exist, don't worry about it
cd reports/en
mv -f languages.conf.new languages.conf.old # languages.conf.new may not exist, don't worry about it
cd /usr/mailscanner.new/etc/
mv -f MailScanner.conf MailScanner.conf.new
mv -f virus.scanners.conf virus.scanners.conf.new
cd reports/en
mv -f languages.conf languages.conf.new
cd ../..
cp -Rf /usr/mailscanner/etc/* ./
mv -f virus.scanners.conf.new virus.scanners.conf
cd reports/en/
mv -f languages.conf.new languages.conf
cd /usr/mailscanner.new/
find ./ -type f | xargs replace "/opt/MailScanner/" "/usr/mailscanner/" --
cd etc/
../bin/upgrade_MailScanner_conf MailScanner.conf MailScanner.conf.new >  MailScanner.new
mv -f MailScanner.conf MailScanner.old
mv -f MailScanner.new  MailScanner.conf
At this point you should edit MailScanner.conf and make any modifications that you want to new settings added by the upgrade.

Then:

Code:
cd /usr
killall MailScanner
sleep 8  # then wait a few seconds for it to stop
mv -f mailscanner mailscanner.old
mv -f mailscanner.new mailscanner
/usr/mailscanner/bin/check_mailscanner
tail -f /var/log/maillog
That last command is to watch the maillog file for any errors. Then test.

If you have any problems, or would prefer someone with experience to do this for you, we offer a cheap package for this service:
http://www.webumake.com/services/

[updated for latest release of MailScanner 1 August 2004]
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com

Last edited by chirpy; 08-01-2004 at 04:59 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-07-2004, 05:08 PM
FWC FWC is offline
Registered User
 
Join Date: May 2002
Location: Ontario, Canada
Posts: 354
FWC
Thanks for the How To. I got this to work with a couple modifications. I had to install:

Net::CIDR
Archive::Zip

Also, this command:
Code:
cp -Rf /usr/mailscanner/etc/* ./
overwrote the new virus.scanners.conf file with the old one, which is in the wrong format. I uncrunched the archive again, copied the new version into the new directory and ran this command again:
Code:
perl -pi -e "s/\/opt\/MailScanner/\/usr\/mailscanner/g"  /usr/mailscanner.new/etc/virus.scanners.conf
After adding the missing Perl modules and fixing the virus.scanners.conf file the updated MailScanner started right up and seems to be working fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-07-2004, 05:18 PM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Hi FWC,

Thank you for that. I've updated the howto with the steps you've mentioned. Oddly my installation already had both the perl compression libraries (RHE3.0 perl 5.8.1).
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-07-2004, 06:40 PM
FWC FWC is offline
Registered User
 
Join Date: May 2002
Location: Ontario, Canada
Posts: 354
FWC
Quote:
Originally posted by chirpy
Hi FWC,

Thank you for that. I've updated the howto with the steps you've mentioned. Oddly my installation already had both the perl compression libraries (RHE3.0 perl 5.8.1).
I did it on a 7.3 box that didn't have them. I have an RHE one I haven't updated yet. Everything is working fine and I'll be updating them all tonight. Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-08-2004, 05:49 AM
Registered User
 
Join Date: Jan 2004
Location: Thurrock, UK
Posts: 39
puzz1ed1
Jonathan,

get the following lines in /maillog..... any ideas what's gone wrong?! ;-)

Steve


MailScanner E-Mail Virus Scanner version 4.28.5 starting...
Using locktype = posix
Creating hardcoded struct_flock subroutine for linux (Linux-type)
New Batch: Scanning 1 messages, 2398 bytes
Looked up unknown string unreadablearchive in language translation file /usr/mailscanner/etc/reports/en/languages.conf
Virus and Content Scanning: Starting
Your virus.scanners.conf file does not have 3 words on each line. See if you have an old one left over by mistake.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-08-2004, 05:54 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Looks like you missed out some of this bit:
Code:
cd /usr/mailscanner/etc/
mv MailScanner.conf.new MailScanner.conf.old # MailScanner.conf.new may not exist, don't worry about it
cd reports/en
mv languages.conf.new languages.conf.old # languages.conf.new may not exist, don't worry about it
cd /usr/mailscanner.new/etc/
mv MailScanner.conf MailScanner.conf.new
mv virus.scanners.conf virus.scanners.conf.new
cd reports/en
mv languages.conf languages.conf.new
cd ../..
cp -Rf /usr/mailscanner/etc/* ./
mv virus.scanners.conf.new virus.scanners.conf
cd reports/en/
mv languages.conf.new languages.conf
You can recover it by downloading the tar.gz file again, then open it up and go to the directories in this distribution for languages.conf and then virus.scanners.conf and copy those new files over the top of the ones now in your /usr/mailscanner/etc/ directory tree.

Let me know if you want more specific instructions.
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-08-2004, 05:55 AM
Registered User
 
Join Date: Jan 2004
Location: Thurrock, UK
Posts: 39
puzz1ed1
ok, fixed that, but now have....

Mar 8 10:55:16 dennis MailScanner[12974]: Can't run commercial checker clamav ("/opt/MailScanner/lib/clamav-wrapper"): No such file or directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-08-2004, 05:58 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Need to run this:

Code:
perl -pi -e "s/\/opt\/MailScanner/\/usr\/mailscanner/g"  /usr/mailscanner/etc/virus.scanners.conf
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-08-2004, 04:25 PM
Registered User
 
Join Date: Sep 2001
Posts: 79
hostseeker
I got the following errors when I tried to start MailScanner after going through the outlined upgrade process:

Starting Mailscanner...
/usr/mailscanner/bin/check_mailscanner: line 112: cd: Sr/mailscanner/bin: No such file or directory
/usr/mailscanner/bin/check_mailscanner: line 113: MailsScanner: command not found

I repeated the process and got the same error. I had installed MailScanner from layer1 about 1 month ago and it was working fine..

Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 03-08-2004, 05:18 PM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
It appears that you may have mis-typed the per substitutes or something.

If you edit /usr/mailscanner/check_mailscanner lines 44 to 46 shouls read:

process=MailScanner
msbindir=/usr/mailscanner/bin
config=/usr/mailscanner/etc/MailScanner.conf

What do yours?
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 03-08-2004, 05:44 PM
Registered User
 
Join Date: Sep 2001
Posts: 79
hostseeker
Mine showed:

process=MailScanner
msbindir=Sr/mailscanner/bin
config=Sr/mailscanner/etc/MailScanner.conf

I corrected them as you stated, however it still isn't working I think the problem has something to do with the very first line of the /usr/mailscanner/bin/MailScanner file.

What should the first line be?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-08-2004, 05:50 PM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
That should read:

#!/usr/bin/perl -I/usr/mailscanner/lib

It does sound like the search and replace didn't work right for you. You might find more files with similar problems.
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 03-08-2004, 06:12 PM
Registered User
 
Join Date: Sep 2001
Posts: 79
hostseeker
Yeah, the first line of mine had Sr/ instead of -I/usr

I fixed that, and started Mailscanner and it seemed to start okay.

However, at this point my email system is completely down and has been since I did this MailScanner upgrade. MailScanner is not running but I can't receive any email. I have restarted Exim and Cpop and the restart worked okay, but no email for the last 2 hours!

Can you give me any ideas as to what might have messed it up and how to fix it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 03-08-2004, 07:39 PM
Registered User
 
Join Date: Sep 2001
Posts: 79
hostseeker
okay apparently I mistyped when doing the upgrade and the search and replace changed some paths. My fault!

If someone could share the proper paths for the following files so I can correct my mistake I will be grateful:

In /usr/mailscanner/etc/virus.scanners.conf

the line for clamav I have:

clamav /usr/mailscanner/lib/clamav-wrapper /u/usr/local

is this correct?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 03-08-2004, 07:45 PM
Registered User
 
Join Date: Nov 2002
Posts: 1,754
anand is on a distinguished road
Quote:
Originally posted by hostseeker
okay apparently I mistyped when doing the upgrade and the search and replace changed some paths. My fault!

If someone could share the proper paths for the following files so I can correct my mistake I will be grateful:

In /usr/mailscanner/etc/virus.scanners.conf

the line for clamav I have:

clamav /usr/mailscanner/lib/clamav-wrapper /u/usr/local

is this correct?
The correct lines are:

PHP Code:
clamav          /usr/mailscanner/lib/clamav-wrapper     /usr/local
clamavmodule    
/bin/false 
__________________
:: Anand ::
Authorised cpanel Partner NOC

ssh root@
who the hell is root ???

Cpanelappz Support Forums are up now. Register Today
http://forums.cpanelappz.com

WHM/cPanel API : http://whmapi.cpanelappz.com
Cpanel Login Script : www.cpanelappz.com/cpanel-login-script.htm
Exiscan+Clam+Exim Auto Installer : www.cpanelappz.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:57 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc