Hi Everyone, 
 
I am trying to filter out emails that have been flagged as spam using Maildrop 
but am not able to get it to work.
Here is my configuration: (I want to create .Junkmail folder if it does not 
exist, sub-scribe .Junkmail folder and move all email with X-Spam-Flag= Yes to 
the .Junkmail folder)  any help=greatly appreciated! 
 
 
/etc/maildroprc
 
 
#Global maildrop filter file
 
#Uncomment this line to make maildrop default to ~/Maildir for
#delivery- this is where courier-imap (amongst others) will look.
DEFAULT="$HOME/Maildir"
 
#make the .Junkmail folder if it doesn't exist
JUNK_FOLDER=.Junkmail
_JUNK_DEST=$DEFAULT/$JUNK_FOLDER/
`test -d $_JUNK_DEST`
if ($RETURNCODE != )
{
`$maildirmake $_JUNK_DEST`
#auto sub-scribe. the following works for courier-imap
`echo INBOX.Junkmail >> $DEFAULT/courierimapsubscribed`
}
 
 
#If the Spam-Flag is set, move the mail to the Junk folder
if (/^X-Spam-Flag:.*YES/)
{
exception {
to $DEFAULT/.Junkmail/
}
}
 
 
main.cf
 
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
mailbox_command = /usr/bin/maildrop
 
 
master.cf
 
 
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=mail argv=/usr/bin/maildrop -d ${recipient}                   
                  

Reply via email to