On Sun, 2004-07-11 at 03:15, Ritesh Raj Sarraf wrote: > Hello all, > I know it might be a minor question. But please bear with me. > I've configured a Debian Sarge with Qmail(From Debian), > Spamassassin, Clamav, Razor. Everything is functioning well and > spam messages are being detected. All I want is to auto-delete > spam msgs or deliver all spam messages to a specific folder. I'm > talking all this system wide. > Thinking procmail as an option I did the following: > Added the following line to .qmail > |preline procmail > > And made a procmail recipe as: > :0 > * ^X-Spam-Status: Yes > /dev/null > > But this doesn't seem to work. My /etc/init.d/qmail is set to > Maildir delivery. > > Besides procmail is there something else (somesaid maildrop, > tried that but failed) through which I could accomplish my > requirement. Maildrop is by far the best and lightest and easiest to configure. Example from my .mailfilter # .mailfilter - rules for maildrop MAILDIR="$HOME/Maildir" # First, catch all spam and divert to junk folder if (/^X-Spam-Flag: YES$/) to $MAILDIR/.junk-spam Now I use exim, so I have defined a transport and router for it. router-- maildrop: debug_print = "R: maildrop for $local_part@$domain" driver = accept check_local_user transport = maildrop_pipe require_files = ${local_part}:${home}/.mailfilter:+/usr/bin/maildrop no_verify no_expn transport-- maildrop_pipe: debug_print = "T: maildrop_pipe for $local_part@$domain" driver = pipe path = "/bin:/usr/bin:/usr/local/bin" command = "/usr/bin/maildrop -d" return_path_add delivery_date_add envelope_to_add It works awesome, I have some folders (using courier-imap) as large as 25,000 messages now. (I should really break them down) Have fun. -- greg, greg@gregfolkert.net The technology that is Stronger, better, faster: Linux
Attachment:
signature.asc
Description: This is a digitally signed message part