Getting sa-update running automatically

In order to get your spam under control (well in the right direction) you can run the sa-update command and keep your 'rules' up-to-date. I'll outline what I have been using and am happy with. This may be obvious for some but hopefully helpful for others.

First, sa-update needs to have two additional perl modules installed that are not needed required for spamassassin to function. These are LWP, Archive::Tar (Nov 2006 bug report). It was also mentioned that UserAgent.pm was not installed by default elsewhere in this forum. In order get all the required perl modules installed use the following command:

Code:

apt-get install libwww-perl libarchive-tar-perl

This will allow the script sa-update to run and update your rules. However who wants to do this manually? I have created by own script that emails me the results of the updates each morning. For me this is preferred as I get many other daily emails from the servers so I can keep an eye on my background tasks.

(I'll assume you know how to create and make executable the sh script)

When there is no problem no output is made, if you have &> /dev/null in your crontab line you will never get response from updates, if there will be problem, you will not get message becasuse response is pointed to null..

if you look in script writen above this topic there is exit value of sa_update function
if [ $exitcode = 0 ]; then....

Hi Hagforce,
I may be wrong but spamassassin does not need to be restarted each time a definition is updated. This is not the case if you use it as a daemon.

Not sure if I understand your manual checking but if you want to see what the latest definitions are in your version of spamassassin visit:

HTML:

/home/admispconfig/ispconfig/tools/spamassassin/usr/var/spamassassin/

Also, in my original code I tried to get the version of the definitions displayed but never got it to work. That being said the information sent via email regarding the versioning was removed. Currently once a week I get an email telling me if new definitions were downloaded. Otherwise nothing else is done. However, from the operation of my ispconfig server this is sufficient.

I see that the files have updated, so the script works, thank you.
But the files in "/home/admispconfig/ispconfig/tools/spamassassin/usr/share/spamassassin" have not updated, is these files not in use?

as you can see on this page > sa_update
this file update spamassasin rules, rules which make unwanted mail spam
spamassasin self need to be recompiled or repackaged in your system when new release is out.

Hello..
Thank you very much for sharing this information us. It will be really very helpful for everybody including me. It is really useful. I will also try these instructions on my server. If I get any type of problem,I will surely discuss it with you. You have done a great job and keep doing good work.