[Dovecot] Question: email system architecture
Zach Bagnall
zach.bagnall at bulletinwireless.com
Wed Aug 18 08:47:36 EEST 2004
On Tue, 17 Aug 2004 23:40:53 +0100, Keith Edmunds
<keith at midnighthax.com> wrote:
> Run a daily (or nightly) cron job to run something like (this is for
> Maildir mailboxes with spam in a "_SPAM" folder, but you can adapt it
> as required):
Might want to add a delay on that or only match messages that have been
Seen, otherwise it'll classify mail that hasn't been read yet. Maybe..
find /home/*/Maildir/*/ -type d -name cur | while read cur; do
foldername=`dirname "$cur"`
find "$cur" -type f -name '*,*S*' | while read file; do
if [ x"$foldername" = x"_SPAM" ]; then
sa-learn --spam "$file"
else
sa-learn --ham "$file"
fi
done
done
On second thought, you probably don't want to feed sa-learn every
message, every day - just the new ones, right? ..
Zach.
More information about the dovecot
mailing list