As I’ve mentioned before, I use cPanel on my Web server. I’ve posted links before for using clamavmodule in Mailscanner, completely removing boxtrapper, among a few other things.
So here are a few other cPanel-related items that I needed to have bookmarked and documented for future reference. (after the jump, as it’s long and pointless for most people here):
- Remember the e-mail trouble I had last week? Basically what caused it was a Perl 5.8.8 upgrade that completely hosed the Mailscanner install I got from these guys. The upgrade was installed by cPanel’s techs as part of the cPanel 11 update, and it totally hosed things. Thankfully, the configserver.com folks helped me out, and gave me a list of the required libraries that needed to be reinstalled.
So if you’re seeing items like this in your /var/log/maillog file:
Jun 20 23:22:01 sparks MailScanner[19584]: MailScanner E-Mail Virus Scanner version 4.60.8 starting…
Jun 20 23:22:02 sparks MailScanner[19584]: Config: calling custom init function MailWatchLogging
Jun 20 23:22:02 sparks MailScanner[19584]: Started SQL Logging child
Jun 20 23:22:02 sparks MailScanner[19584]: WARNING: You are trying to use the SpamAssassin cache but your DBI and/or DBD::SQLite Perl modules are not properly installed!
Jun 20 23:22:03 sparks MailScanner[19584]: ClamAV Perl module not found, did you install it?
You need run these commands on the command line to get the libraries back you need:
/scripts/perlinstaller –force Scalar::Util
/scripts/perlinstaller –force Compress::Raw::Zlib Net::CIDR Archive::Zip
/scripts/perlinstaller –force Compress::Zlib Convert::BinHex Inline::C Time::HiRes Digest::SHA1
/scripts/perlinstaller –force IO::Zlib Net::IP
/scripts/perlinstaller –force Mail::ClamAV
And then you need to reinstall MailScanner using the directions here which I’m going to copy here for future reference:
Upgrading MailScanner
- Remove any previous versions before downloading:
rm -fv msinstall.tar.gz
rm -Rfv msinstall/
- Run the following commands from the root shell:
wget http://www.configserver.com/free/msinstall.tar.gz
tar -xzf msinstall.tar.gz
cd msinstall/
sh install.sh
Select option 1 to upgrade
- Check that MailScanner has restarted OK:
tail -f /var/log/maillog
Upgrading ClamAV
- Download the latest stable ClamAV distribution from http://www.clamav.net
- Expand the distribution and cd into the resultant directory and build ClamAV using:
tar -xzf clamav-*
cd clamav*
./configure –disable-zlib-vcheck
make
make install
replace “Example” “#Example” — /usr/local/etc/freshclam.conf
replace “Example” “#Example” — /usr/local/etc/clamd.conf
- Run freshclam to download the latest definitions:
freshclam
- If you’re using the clamavmodule, check you have the latest version installed:
/scripts/perlinstaller –force Mail::ClamAV
- Then restart MailScanner with:service MailScanner restart
- Remove any previous versions before downloading:
- Speaking of that fateful Perl upgrade, it also hosed my ImageMagick installation, so I had to reinstall that as well. Here’s how I did it:
First remove any old RPM installations
rpm -qa | grep -i Magick
rpm -e anything that pops up.
Go to your favourite install directory (/usr/src) whatever
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd into the new folder (current version is ImageMagick-6.3.3)
Configure it with whatever crazy stuff you need:
./configure –enable-shared –with-modules –without-x –with-gs-font-dir=default –with-perl=yes –with-xml=yes –with-zlib=yes –with-jpeg=yes
make && make install
From the folder you are in:
cd PerlMagick
perl Makefile.PL
make
make install
- If you haven’t upgraded to cPanel 11 yet, read this checklist first to make sure all your ducks are in a row first.
- Here’s a handy server cloning method.
- If you want a simple script to install a bunch of great scripts and hardens your server, this is really handy (direct download).
- List of cPanel/Mailscanner/Exim Tweaks.
- Tightening down zone transfers in cPanel.
That’s all for now.
Comments
That’s a cool idea, but I wonder how long it will stand there before it gets vandalized.
That’s a cool idea, but I wonder how long it will stand there before it gets vandalized.