Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 12 1 2 3 11 ... LastLast
Results 1 to 15 of 177
  1. #1
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    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]
    Last edited by chirpy; 08-01-2004 at 03:59 PM.
    Jonathan Michaelson

    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

  2. #2
    FWC
    FWC is offline
    Member
    Join Date
    May 2002
    Location
    Ontario, Canada
    Posts
    354

    Default

    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.

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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

    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

  4. #4
    FWC
    FWC is offline
    Member
    Join Date
    May 2002
    Location
    Ontario, Canada
    Posts
    354

    Default

    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.

  5. #5
    Member
    Join Date
    Jan 2004
    Location
    Thurrock, UK
    Posts
    39

    Default

    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.

  6. #6
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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

    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

  7. #7
    Member
    Join Date
    Jan 2004
    Location
    Thurrock, UK
    Posts
    39

    Default

    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

  8. #8
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Need to run this:

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

    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

  9. #9
    Member
    Join Date
    Sep 2001
    Posts
    81

    Default

    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?

  10. #10
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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

    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

  11. #11
    Member
    Join Date
    Sep 2001
    Posts
    81

    Default

    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?

  12. #12
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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

    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

  13. #13
    Member
    Join Date
    Sep 2001
    Posts
    81

    Default

    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?

  14. #14
    Member
    Join Date
    Sep 2001
    Posts
    81

    Default

    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?

  15. #15
    Member
    Join Date
    Nov 2002
    Posts
    1,781
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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 ::

    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

+ Reply to Thread
Page 1 of 12 1 2 3 11 ... LastLast
Similar Threads & Tags
Similar threads

  1. Mailscanner from layer1
    By DN-Paul in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 05-14-2004, 10:12 PM
  2. Install Layer1 package with CLAMAV+Mailscanner updated?
    By damainman in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-14-2004, 03:00 AM
  3. Howto restart Mailscanner FROM layer1.cpanel.net
    By nappa in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-04-2004, 03:17 PM
  4. Layer1 mailscanner-av?
    By xsenses in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-27-2003, 09:21 PM
  5. MailScanner layer1 Cpanel issues after install FIX
    By huffdata in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-27-2003, 03:04 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube