Help - Search - Members - Calendar
Full Version: HOWTO: Upgrade MailScanner on Ensim 4.0.x
The Planet Forums > Control Panels > Ensim > Ensim HOWTOs
ArtieMcD
This posting is now obsolete. I have reposted and updated the instructions in a new thread so the thread title better represents the control panel name/versions.

The new thread is at:
http://forums.theplanet.com/index.php?showtopic=91258


















MailScanner 4.64.3-2 is out now. This is the latest monthly... err... periodic update to MailScanner.

This procedure has been tested in Ensim Pro X.3 for RHEL4 and works using the out of the box Ensim install. Your results may vary on other configurations.

This upgrade procedure will upgrade the version of mailscanner installed by ensim out of the box and will upgrade you from any intermediate versions you may have installed using an earlier version of this howto.

We strongly recommend disabling the "Send Notices" and put "All-Viruses" in the Silent Viruses line before enabling MailScanner. For some reason out of the box, ensim bounces all virus mail which of course only makes the virii/spam problem worse.

Here are the steps to upgrade... It is assumed you already have an installed and working copy of MailScanner and your install already configured sendmail and other needed workarounds to get MailScanner to work with ensim’s or your control panels handling of virtual domains.Refer to threads regarding installing MailScanner if you are performing a new install.

Please make sure you understand your MailScanner configuration and are 100% comfortable with performing this operation before continuing.

wget http://www.sng.ecs.soton.ac.uk/mailscanner....8-1.rpm.tar.gz

tar xvfz MailScanner-4.64.3-2.rpm.tar.gz

cd MailScanner-4.64.3-2

As root:

Backup your MailScanner startup script:
cp /etc/init.d/MailScanner /etc/init.d/MailScanner.pre.4.64.3-2

./install.sh

If this is your first time upgrading MailScanner using this howto, you need to do the following. Everyone else should just verify thier settings are ok.
vi /etc/MailScanner/virus.scanners.conf
change the line
clamav /usr/lib/MailScanner/clamav-wrapper /usr/local
to
clamav /usr/lib/MailScanner/clamav-wrapper /usr

I also recommend you comment out the generic virus scanner unless you use it. MailScanner constanly tries to update it every hour even though you aren't using it.

Finally, if you use clamavmodule, you need to fix the "Monitors for ClamAV Updates" in /etc/MailScanner/MailScanner.conf. It should be:

Monitors for ClamAV Updates = /var/clamav/*.cvd


That’s pretty much it for the software installation... Now we need to merge your old MailScanner.conf file with the new one and to update any new report files that MailScanner delivered, if you customize them.

The report files can be found at /etc/MailScanner/report/en
Do an ls -ltra to see which are new files that need to be updates.

As for the MailScanner.conf file this can be found at
/etc/MailScanner.

I recommend a manual merge of the MailScanner.conf file and MailScanner.conf.rpmnew so you can get updated comments and documentation components. However if you wish to automate the merge follow these steps (again as root).

It appears the 4.31 and later versions of MailScanner attempts to upgrade the MailScanner.conf file automatically for you. This upgrade went ok on our box, but you should review the changes to make sure your intended changes stuck.

cd /etc/MailScanner
/usr/sbin/upgrade_MailScanner_conf MailScanner.conf MailScanner.conf.rpmnew > MailScanner.conf.new

diff MailScanner.conf MailScanner.conf.new (and verify you are happy with the changes)

mv MailScanner.conf MailScanner.conf.old
mv MailScanner.conf.new MailScanner.conf

If you use f-prot, check to see if the wrapper script is correct.
in
/usr/lib/MailScanner/f-prot-wrapper
Find:
RamDisk=yes # Set this to yes if you are running in ramdisk or tmpfs
and change to
RamDisk=no # Set this to yes if you are running in ramdisk or tmpfs


That should do it. All that’s left is for good measure is to restart MailScanner.

/sbin/service MailScanner restart

Note: If you have upgraded to spamassassin 3.0.x on Ensim 4.0.3 or you have Ensim 4.0.4 or later, changes in the 3.x version of spamassassin make the setting for "SpamAssassin Auto Whitelist" in MailScanner.conf irrelevant. spamassasin now ignores the command line argument MailScanner is passing and instead is using the "use_auto_whitelist" found in spam.assassin.prefs.conf. If you want to use the auto-whitelist featrue, you must change the setting in the spam.assassin.prefs.conf (the defualt has changed in a recent MailScanner release). This does not apply if you are on a version of spamassassin older than 3.0.x.


You may want to consider the following code modification to MailScanner to reduce usless messages in the maillog and in the nightly LogWatch output.
CODE
Find

MailScanner::Log::InfoLog("Batch (%d message%s) processed in %.2f seconds",

in /usr/lib/MailScanner/MailScanner/MessageBatch.pm and replace with

MailScanner::Log::DebugLog("Batch (%d message%s) processed in %.2f seconds",



Find

MailScanner::Log::InfoLog("SpamAssassin cache hit for message %s", $message->{id});

in /usr/lib/MailScanner/MailScanner/SA.pm and replace with

MailScanner::Log::DebugLog("SpamAssassin cache hit for message %s", $message->{id});




Good luck.

We have a howto avaliable for MailWatch if you're interested:
http://forum.ev1servers.net/showthread.php?p=355291
Wolfe
Has anyone tried this successfully with 4.0.3 on FC1?
vtrac
I just did this on CentOS 3.4 Seems to have worked.
REBIS
Thanks Artie!
vtrac
I accidentally erased all of my MailScanner rules. Can someone post their /etc/MailScanner/rules/quarantine.rules and /etc/MailScanner/rules/virus-scan.rules?
acidbox
I did the MailScanner update, and on their website they have a new post that says:

QUOTE
7/06/2005 Updated Clam+SpamAssassin distribution package for SpamAssassin 3.0.4. You can download it  and install it with its install.sh script.  


Is it safe to run this update to also update SA and clamAV on Ensim 4.0.3?
acidbox
QUOTE (acidbox)
I did the MailScanner update, and on their website they have a new post that says:



Is it safe to run this update to also update SA and clamAV on Ensim 4.0.3?


Ok, well I did the upgrade from the MailScanner site and it updated my clamAV and SpamAssassin to 3.04 successfully. So that seems to be the easiest way to get all three done at once. just FYI (RHEL Ensim 4.0.3)
ArtieMcD
I have updated the howto to reflect the new release of mailscanner:
4.43.8-1
ArtieMcD
Updated top post to reflect release of 4.44.6-2
tyrnight
will this bork ensim 4.0.4 ?

probably not, but just being safe
L00ph0le
Looks like a good how-to I am looking to upgrade my ClamAV also,any how to's on that?
ArtieMcD
I should probabaly publish a new topic for one.

http://forum.ensim.com/showpost.php?p=5893...31&postcount=32

Just substitute the clamav rpm with the upgraded one. Note since the clamav that Ensim uses now has new rpm dependencies you have to install the zlib rpms too. Which you only need to do once in the future.
Catalyst
RHEL/FC1 Zlib: http://crash.fce.vutbr.cz/crash-hat/1/zlib/
ArtieMcD
QUOTE (Catalyst)


Quote from my clamav upgrade thread in regards to RHEL:
BTW, note I did not go to the zlib 1.2.2.2 release, this version introduces even more unmet dependencies and I want to stay as close to stock RHEL as possible.
Catalyst
You got dependency errors on the zlib-1.2.2 crash-hat RPM? I haven't...

IMHO, crash-hat's is *way* closer to RHEL than the FC3 version in the post --- FC1 & RHEL use the identical version of glib, where FC3 uses 2.3.4, thus moving it further away from "stock."

But on the lighter side, all this is rhetorical anyway, since you should be using 1.2.3 at minimum. *grin*
imcomguy
Doh. The original link in this thread (MailScanner-4.44.6-2.rpm.tar.gz) is defunct now. Does anyone know where to obtain this rpm from on an alternative server?

Thanks!
ArtieMcD
Top post updated to cover release of 4.45
Alosery
What is mailscanner exactly?

Is this a combi installer for spamasassin and clamav
Becouse i already have te latets clamav version running and spamasassin 3.0.2

I have an ensim 4.0.3-25fc1 server
huck
Nice work but I would add one step to backup your current mailscanner install:

The key files are in
/usr/lib/MailScanner
/etc/MailScanner

There are a few other files scattered about but the bulk are in those two directories. Should you update fail, you can restore.


Also, while you are at it consider updating clamav. The clamav included with ensim is outdated and may not update properly with future versions. If you update clamav, consider switching ensim to using clamav directly vs. clamavmodule. We've seen some issues with the clamavmodule.
Alosery
How can i tell ensim to use clamav directly vs. clamavmodule

I have folowd the clamav update at the ensim site.
ArtieMcD
As for a combo installer, You should not bother with it if you are on Ensim 4.0.4 on RHEL4 as up2date supports and delivers spamassassin 3.0.x.

clamav is indeed one product you have to manually update.. But Ensim officially supports this now and have their own procedure for doing so. So I won't bother publishing anything contrary to that procedure.

One word of caution on the clamav update, the dag version differs in the way it installs compared tot he version originally shipped by ensim. The dag version does not install freshclam and such and instead uses a cron.nightly script for updates, and it also configured clamd.conf and freshclam.conf differently. Of course MailScanner by default also auto updates the products every hour. There other subtle changes between the versions... So just pay attention and make sure your MailScanner.conf file and virus.scanners files are accurate compared to your selections.
ArtieMcD
QUOTE (Alosery)
How can i tell ensim to use clamav directly vs. clamavmodule


Check the
Virus Scanners

line in your

/etc/MailScanner/MailScanner.conf

file
Alosery
Yes i found it.

in my /etc/MailScanner/MailScanner.conf
it points to clamavmodule

Can i just change it to clamav wjitout any problems????
Alosery
hello Again
I want to upgrade my mailscanner version.
Now i have version 4.31.6-1
is this howto als good for a fedora core1 and/or core2 server

BTW i'm also lokking for a good howto on upgrading spamasassin to 3.1 on my ensim 4.0.3 fedora server

Thanks
Alosery
Hello,

well i have insallet the mailscanner version to mailscanner-4.45.4-1
on a new fedora core2 server whit ensim 4.0.3-22fc2
and it seems to have instaled ok.
But it did not upgrade spamasassin and clamav
Spamasassin is stil version spamassassin-2.63-8
and clamav is stil version ClamAV 0.80

It seems i have to upgrade spamasasin and clamav manualy :-(
ArtieMcD
I have updated the howto for the October release of MailScanner.
Alosery
Hello,

Can anybody thell me please if this update is also good for fedora core 1.
I'm a bit afraid of updating on this fedora server.
Becouse i dont want my customors to lose e-mail.

Please i need advice.
ArtieMcD
Updated howto to reflect release of 4.47.4-2
ArtieMcD
Updated howto for release of 4.48
ArtieMcD
Howto updated for 4.49 release.
raj43210
Artie,

Thanks for the How-to. Worked perfect on a Ensim Pro 4.0.3 FC2

Raj
ArtieMcD
This months release is 4.50. It's a major release as per the release notes, with performance enhacements.
mv_
QUOTE (ArtieMcD)
This months release is 4.50.  It's a major release as per the release notes, with performance enhacements.

there is stable 4.51 version available at http://www.sng.ecs.soton.ac.uk/mailscanner....5-1.rpm.tar.gz
ronno
I tried this upgrade yesterday and everything appeared install ok, but in the email headers, I still see this (my previous version):

X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)

How can I tell if it actually worked?

I'm running Ensim Pro 4.0.3-22.rhel.3ES

Thanks,
Ronnie
intelics
QUOTE (ArtieMcD)
Now we need to merge your old MailScanner.conf file with the new one and to update any new report files that MailScanner delivered, if you customize them........I recommend a manual merge of the MailScanner.conf file and MailScanner.conf.rpmnew so you can get updated comments and documentation components. However if you wish to automate the merge follow these steps


If I never used mailscanner, do I need to go through these steps to upgrade?

I noticed that when I had it on, I'd get duplicates of my emails, so I stopped using it almost out of the box.
ArtieMcD
If you want to use spamassassin's auto-whitelist feature, and you are using spamassassin 3.0.x or greater with MailScanner, you may want to check out the purple note I have added to the how to. If you have migrated to this combination your auto-whitelist feature may not be working even though you think you have it turned on.
mazza
Hello can this be used for ensim pro X i know the topic says the older version just had to ask
thanks
tyrnight
I would not recommend it. as X already has this feature built in
ArtieMcD
This upgrade works for all versions of Ensim that suports mailscanner including Pro X. We just performed the latest MailScanner update on our boxes, and will soon be updating the HOWTO to show this new version. We also upgraded to Pro X recently, so the HOWTO will be updated to reflect that version as the supported/tested version.
pseconds
Not sure what I did, but I could use some help. It appears following the directions worked, mailscanner starts, but does not appear to be scanning messages. This is ensim 4.1 on rhe4.

I see this in the logs ever few seconds, regardless if mail is coming in:

Nov 8 17:21:23 secure MailScanner[22949]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Nov 8 17:21:23 secure MailScanner[22949]: Read 755 hostnames from the phishing whitelist
Nov 8 17:21:25 secure MailScanner[22949]: None of the files matched by the "Monitors For ClamAV Updates" patterns exist!
Nov 8 17:21:34 secure MailScanner[22957]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Nov 8 17:21:34 secure MailScanner[22957]: Read 755 hostnames from the phishing whitelist
Nov 8 17:21:36 secure MailScanner[22957]: None of the files matched by the "Monitors For ClamAV Updates" patterns exist!
Nov 8 17:21:45 secure MailScanner[22965]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Nov 8 17:21:45 secure MailScanner[22965]: Read 755 hostnames from the phishing whitelist
Nov 8 17:21:47 secure MailScanner[22965]: None of the files matched by the "Monitors For ClamAV Updates"
pseconds
It was a path issue - I had changed clamav to /var/clamav instead of leaving it as /var/lib/clamav.
PaulEsch
I just upgraded to 4.56.8 and see the following errors in my logs. My Ensim version is 4.0.2-7.rhel. Any help appreciated.

In /var/log/messages
Nov 9 23:05:13 main MailScanner: waiting for children to die: Process did not exit cleanly, returned 255 with signal 0
Nov 9 23:05:46 main last message repeated 3 times
Nov 9 23:06:52 main last message repeated 6 times
Nov 9 23:07:25 main last message repeated 3 times

and

In /var/log/maillog
Nov 9 23:09:38 main MailScanner[27375]: MailScanner E-Mail Virus Scanner version 4.56.8 starting...
Nov 9 23:09:38 main MailScanner[27375]: Read 755 hostnames from the phishing whitelist
Nov 9 23:09:38 main MailScanner[27375]: ClamAV Perl module must be at least version 0.12 and you only have version 0.11, and ClamAV must be at least version 0.80
ArtieMcD
I have updated this howto in the first post to cover the recent release of MailScanner 4.59.
ArtieMcD
this howto now is updated to reflect the new 4.60 release.
mv_
I'm having problem with lot of spam on my Ensim Pro server. How do I get the benefit from using the sa-update which is not installed on my server ? Thanks a lot.

I'm running Spamassassin 3.0.4.
Thanks
herbertjoei
Hi Artie,

Thanks for making sure the howto is updated. This is my first time to do this and i only have basic knowledge. My question is, does the 1st post still work with 4.0.3-22 on RHEL3 es? As far as I konw, mailscanner on that server is out of the box default.

Also, i'm getting confused, what is ClamAV for? I thought I only need to upgrade mailscanner? Will the steps on the post update both clamav and spamassassin as well? How does the three (mailscanner, spamassassin, clamav) work with each other anyway?

TIA

Herbert
ArtieMcD
QUOTE (herbertjoei @ Jul 31 2007, 02:05 AM) *
Thanks for making sure the howto is updated. This is my first time to do this and i only have basic knowledge. My question is, does the 1st post still work with 4.0.3-22 on RHEL3 es? As far as I know, mailscanner on that server is out of the box default.


It probably will work, but I don't have a system of that configuration to test it out to confirm. The key is the protect and check your Mailscanner.conf file before and after the upgrade to make sure the key settings needed by ensim and your mail configuration are correct.


QUOTE (herbertjoei @ Jul 31 2007, 02:05 AM) *
Also, i'm getting confused, what is ClamAV for? I thought I only need to upgrade mailscanner? Will the steps on the post update both clamav and spamassassin as well? How does the three (mailscanner, spamassassin, clamav) work with each other anyway?


Clamav, spamassassin, and MailScanner are three completely different applications and each are maintained and updated separately. MailScanner does however call and can use clamav and spamassassin if you choose to do so through your own settings in MailScanner.conf.

Given that, no these steps do not update or maintain clamav and spamassassin. Those are outside the scope of this HOWTO.
MailScanner and clamav are both applications installed by ensim as part of their product install. spamassassin is actually part of RHEL and managed through up2date. I usually do not recommend anyone upgrade any rpms that are managed via RHEL and up2date (unless you have a darn good reason to do so, and you know what you are doing) and therefore I usually don't recommend anyone change spamassassin outside of a normal up2date upgrade.

Since clamav is a 3rd party application that ensim elects to install, it's usually ok to upgrade those rpms as needed (and you have to on your own if you want to keep the application up2date). Recently ensim has switched and is deploying the dag-wiers produced clamav rpms and I recommend you stick with the same clamav rpms if you choose to update them. There are some older versions of ensim that used a different clamav distribution which became problematic to upgrade for a time due to other rpm dependencies so you may encounter that issue, but I simply do not remember what version ensim made the permanent switch to the dag rpms. Whatever that version is, you'll want to be at least at that version of ensim.
herbertjoei
QUOTE (ArtieMcD @ Jul 31 2007, 09:36 PM) *
It probably will work, but I don't have a system of that configuration to test it out to confirm. The key is the protect and check your Mailscanner.conf file before and after the upgrade to make sure the key settings needed by ensim and your mail configuration are correct.


How would I know which configuration are correct for ensim if ever i needed to check it after upgrading? Also, I read somewhere that Clam and SA are options for Mailscanner to use since mailscanner also has it's own AV and Spam checking engine. How would I know how to check if mailscanner is using them? And if it does, do i need to turn off the builtin mailscanner engines?

QUOTE (ArtieMcD @ Jul 31 2007, 09:36 PM) *
Clamav, spamassassin, and MailScanner are three completely different applications and each are maintained and updated separately. MailScanner does however call and can use clamav and spamassassin if you choose to do so through your own settings in MailScanner.conf.


I saw in my mailscanner.con that "Virus Scanners = clamavmodule" and not clamav (virus.scanners.conf said that "clamavmodule /bin/false /tmp"). What does this mean? Further clamd service was turned off? (not sure if this was default but I think it was alraedy like that when we got our server from the provider since we did a lot of rstart already and it's off)

Also, in mailscanner, Spam Check = off and Spamassassin = no, does this mean I'm not checking for spam?

Thanks again artie.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.