Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: trenskow on September 05, 2004, 12:24:57 AM

Title: Bayesian Filtering, and mail alias
Post by: trenskow on September 05, 2004, 12:24:57 AM
Hi all
I want to use Bayesian Filtering for deleting spam mails.

This is how i would like to set it up.

I want all my users, to be able to forward mails to missedspam@mydomain.dk and notspam@mydomain.dk
How do i make these email aliases in sme server, without creating users on the server?
It just need to be a single mail folder for each of the 2 email adresses.

then i want to make a daily cron job, that counts the number of messages in each folder, and when there are 100 in one of them, it runs
(for missedspam) = sa-learn --spam -C /path/to/spamassassin --showdots --dir /path/to/directory/full/of/spam/msgs
(for notspam) = sa-learn --ham -C /path/to/spamassassin --showdots --dir /path/to/directory/full/of/ham/msgs

and then restart spamd

so in recap....
1. Question: How do i create mail aliases with a mailfolder, without creating a new user?
2. Question: How do i, from a cron job, count the number of messages, and if its 100 + it will run a job?

any ideas anyone?  :pint:
Title: Bayesian Filtering, and mail alias
Post by: mbachmann on September 08, 2004, 02:00:24 PM
1.: Pseudonyms, enter a new pseudnym
2.: place an entry in /etc/cron.daily or wherever wich calls a shell script.

Now learn how to write a shell script. I can only do very simple ones, look at some of the scripts in cron to get an idea.
Title: Bayesian Filtering, and mail alias
Post by: trenskow on September 08, 2004, 02:10:27 PM
Quote
1.: Pseudonyms, enter a new pseudnym

Pseudonym, do you mean in the server-manager, or is it somewhere else?

Quote
2.: place an entry in /etc/cron.daily or wherever wich calls a shell script.


ok, i will try..
Someone else have any idea, of how to make a cronjob count the number of messages in a folder?