Re: Procmail in Vmailmgr

Josh Trutwin <[email protected]> Tue, 21 Feb 2006 06:50:59 -0600
Newsgroups gmane.mail.vmailmgr
Message-ID <[email protected]>
ChuanWee wrote:
> Hi,
> 
> I need to filter incoming emails to a spam folder if their Spam-status is set 
> to Yes. The email has been processed by SpamAssassin on another server.
> 
> After looking thru all of the archive, it seems that getting Procmail to work 
> with Vmailmgr is not as simple as setting up a .qmail file and getting 
> procmail to run in it.
> 
> Has anyone implemented this in a simple way? 
> 
> Tom Goulet had supposely succeeded and document it in
> http://web.em.ca/~tomg/tips/vmailmgr_procmail.html
> but the link is not working....Anyone has the correct/updated link?

Here's what I do - I doubt it's the best approach, but it works:

Inside domainxyz.com's control account home dir there is the 
.qmail-josh file for [email protected] (all on one line):

| /var/qmail/bin/preline /usr/bin/procmail 
/usr/local/sites/www.domainxyz.com/users
/josh/.procmailrc

Here's the .procmailrc file (I filter on X-Spam-Level):

HOME=/usr/local/sites/www.domainxyz.com/users/josh
#LOGFILE=$HOME/.procmaillog
#VERBOSE=yes
MAILDIR=$HOME
LANG=en_US
DROPPRIVS=yes # don't run procmail as root

# Mails with a score of 10 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different folder.
:0:$HOME/.procmail.lock
* ^X-Spam-Level: \*\*\*\*\*
|/usr/local/bin/maildir $MAILDIR/.SPAM
# could also send to /dev/null

# other rules here

# Default rule, send message to INBOX
:0:$HOME/.procmail.lock
|/usr/local/bin/maildir $MAILDIR


/usr/local/bin/maildir is a C program I found here:

http://www.ornl.gov/lists/mailing-lists/qmail/1997/11/msg00454.html

I doubt I need this anymore, but it works so I'm not going to change 
it.  :)

Any tips appreciated.

Thanks,

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]