PLEASE REPLY ON-LIST > > Please reply on-list only. > > > > > >>>>> 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=/usr/bin/maildirmake > >>>> MAILDIR=$DEFAULT > >>>> JUNK_FOLDER=.Spam > >>>> > >>>> _JUNK_DEST=$MAILDIR/$JUNK_FOLDER/ > >>>> > >>>> > >>>> #automatically create the Junk folder > >>>> `test -d $_JUNK_DEST` > >>>> if ($RETURNCODE != 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/" > >>>> } > >>>> } > >>>> > >>>> > >>> Only thing I would do differently is not put this in the global > >>> maildroprc. My preference is to let the user have ultimate control > >>> over how they handle spam, but provide them with a default that is > >>> ready to roll. What that means is to create a spam folder when their > >>> account gets created, then create the filtering rule in the *user* > >>> maildroprc. I make sure the rule is created with the exact same > >>> format as if the serversidefilter plugin had made it so the user can > >>> change it however they wish using that plugin. I also make sure the > >>> spam folder is subscribed to, etc., so they can also change it in the > >>> SM interface. > >>> > >> mmmmhhh... still confused, > >> which file do i write this code in ?? sorry i'm quite new to this > >> > > > > Then you have to do more homework. We cannot spoon-feed you. As was > > stated, please look into installing a LDA such as maildrop or procmail > > into your MTA. The sample code was for a maildrop configuration file. > > > > > I am configuring maildrop for my domains. I appreciate the code sample. > The documentation for maildrop is anything but clear. I wonder why you > create the junk maildir in the maildroprc code. Doesn't that directory > only need to be created once? That code is wrapped in a test such that it is only created if it does not exist. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV -- squirrelmail-users mailing list Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users