Upgrading Guide - SpamTagger/SpamTagger-Plus GitHub Wiki

Day-to-day updates

MailCleaner machines run the following cron task as root:

0,15,30,45 * * * *  /usr/mailcleaner/scripts/cron/mailcleaner_cron.pl > /dev/null

Data feeds

For Enterprise Edition, this script has the following child scripts:

  • /usr/mailcleaner/bin/check_update.pl - looks for out-of-schedule updates via exec.sh scripts (Enterprise Edition only). This allows us to force service upgrades or take other critical actions as soon as solutions are available.
  • /usr/mailcleaner/bin/fetch_clamspam.sh - fetches the latest clamspam signatures.
  • /usr/mailcleaner/bin/fetch_rules.sh - fetches the latest spamc and newsl rules.
  • /usr/mailcleaner/scripts/cron/update_antivirus.sh - fetches clamd signature updates, including third-party signatures.

For Community edition, the freshclam downloads only the default clamspam and clamav signatures, and spamc and newsl rules are downloaded nightly as part of the git pull update.

There is a dedicated script to fetch bayes data. Enterprise Edition will see updates around a couple of times per day. Community Edition will get a monthly snapshot.

Nightly updates

There is also a nightly cron task:

30 22 * * *  /root/Updater4MC/updater4mc.sh

which primarily does 2 things:

  • Performs a git pull on /usr/mailcleaner/ to apply the latest patches from this repository. This will deploy almost all new features which don't require changes to the database or running of system commands. The latest patch hash is shown after the '-' in the 'patch level', eg: '91-3645b23'
  • Runs scripts from it's own repository (after pulling) in /root/Updater4MC/updates/. These scripts will perform actions which cannot reasonably be done by git, including updating packages, applying patches to files outside the git repository, etc. For significant update scripts, the version will be bumped to that update's publication date. Regardless, the latest applied update script number will appear before the '-' in the patch level, eg: '91-3645b23'

You can manually run this script to have it run out-of-schedule, or modify the cron task to always run at at time other than 22:30. However, you should make sure that it does not conflict with the Configuration->General settings->Periodic tasks->Daily task run at time. The updater script will stop and start all services if there were any changes in git or any update scripts, so this would interrupt the sending of quarantine reports. The updates typically take less than 10 minutes. Summary reports usually only take a couple of minutes, but could potentially take more than hour on a machine with 10's of thousands of reports. Since the default report time is 00:00 and this is rarely changed to be earlier in the evening, 22:30 was selected as a safe default time.

Major version updagrades

Upgrading from previous OS release

Please see the Migration Guide.

Other considerations

There may be some additional files that you need to copy if you have customized your configuration. Specifically, you may have a custom set of template files in /usr/mailcleaner/www/user/htdocs/templates and /usr/mailcleaner/templates/*.