From: Eray A. <era...@ca...> - 2006-12-14 07:05:57
|
Eric Beda wrote: > 1. I want my users to have an automatically created spam folder > 2. To automatically redirect spam to this folder Use a mail delivery agent like maildrop or procmail. For maildrop, something like below should work in maildroprc: maildirmake=3D/usr/bin/maildirmake MAILDIR=3D$DEFAULT JUNK_FOLDER=3D.Spam _JUNK_DEST=3D$MAILDIR/$JUNK_FOLDER/ #automatically create the Junk folder `test -d $_JUNK_DEST` if ($RETURNCODE !=3D 0 ) { `$maildirmake $_JUNK_DEST` # auto subscribe. the following works for courier-imap `echo INBOX$JUNK_FOLDER >> $MAILDIR/courierimapsubscribed` } # Spam gets tagged with X-Spam-Flag if ( /^X-Spam-Flag: YES/:h ) { exception { to "$_JUNK_DEST" } } else { exception { to "$MAILDIR/" } } --=20 Eray |