19 January 2011

SME Server 7.4 - Adding "Learn As Ham" Command For Individual Users to a Cron job

Situation
While a "LearnAsHam" script was worked out there was a need to learn ham messages from certain users mailboxes rather than every mailbox on the sme server. The system admin was running these manually when time permitted what was needed was a cron job to save time and as fill in measure.

Solution
To setup a cron job from the console run

mkdir -p /etc/e-smith/templates-custom/etc/crontab
then

pico -w  /etc/e-smith/templates-custom/etc/crontab/your_file_name


Add your cron entries.

Example below
0 12 * * 1-5 root sa-learn --ham /home/e-smith/files/users/insert mailboxname/Maildir/cur/*
(Runs sa-learn against a set users mailbox 12 noon every day from Monday to Friday)

Save. Then from the console


/sbin/e-smith/expand-template etc/crontab

To check it has been added to cron type at the console
more /etc/crontab

then to finish
expand-template /etc/crontab 

When completed the desginated admin on the system will receive an email from the Cron Daemon confirming the number of tokens learned from the amount of messages examined.

 

16 January 2011

How to correct a flipped screen - Windows

Situation
Somehow you have managed to rotate your screen so it is upside down and you want to restore it to the right way round.

Solution
Press, simultaneously, the following keys
CTRL + ALT + "up" arrow