Koozali.org: home of the SME Server

spammassassin

Mario

spammassassin
« on: June 04, 2003, 01:43:15 AM »
I´ve installed spamassassin and it works fine - the recognized mails are drop in a directory called "junkmail". Now i search for a solution, that:

1. move all mails in a subdirectory of "junkmail" - eg name of the month
2. sent a mail to the mailbox-user to check the junkmail-subdirectory
3. an clear this folder every end of month

Has anyone a idea or a tipp??

Thanks in advance

Mario

Michiel

Re: spammassassin
« Reply #1 on: June 04, 2003, 02:09:27 AM »
> 1. move all mails in a subdirectory of "junkmail" - eg name of the month
Can be done with procmail. Something like (untested)
DATE=date +"%Y-%m"
:0
* ^X-Spam-Status: Yes
$MAILDIR/DATE/

Have a look in man procmailrc


> 2. sent a mail to the mailbox-user to check the
> junkmail-subdirectory

cron job checking for each user if the above folder exists. Again untested:
if [ -e /path/to/e-mailbox/of/user/junkmail/date ]
then
echo "Please check your junkmail"| mail -s "spam alert" mario
fi

> 3. an clear this folder every end of month
again cronjob with:
rm -f /the/above/folder

Should work, I guess.
Michiel

Mario

Re: spammassassin
« Reply #2 on: June 04, 2003, 02:50:58 AM »
Thanks for your quick response

looks good

Mario