From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46443 Path: main.gmane.org!not-for-mail From: Scott A Crosby Newsgroups: gmane.emacs.gnus.general Subject: Re: Splitting and procmail Date: 08 Sep 2002 22:40:33 -0500 Organization: Rice University Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031542925 5433 127.0.0.1 (9 Sep 2002 03:42:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Sep 2002 03:42:05 +0000 (UTC) Cc: Jonas Steverud Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17oFR5-0001PJ-00 for ; Mon, 09 Sep 2002 05:42:03 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17oFQ0-0002Ps-00; Sun, 08 Sep 2002 22:40:56 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 08 Sep 2002 22:41:31 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id WAA06986 for ; Sun, 8 Sep 2002 22:41:18 -0500 (CDT) Original-Received: (qmail 15024 invoked by alias); 9 Sep 2002 03:40:35 -0000 Original-Received: (qmail 15019 invoked from network); 9 Sep 2002 03:40:34 -0000 Original-Received: from cs.rice.edu (128.42.1.30) by gnus.org with SMTP; 9 Sep 2002 03:40:34 -0000 Original-Received: from localhost (localhost [127.0.0.1]) by cs.rice.edu (Postfix) with ESMTP id 767934A9E0; Sun, 8 Sep 2002 22:40:34 -0500 (CDT) Original-Received: from bert.cs.rice.edu (bert.cs.rice.edu [128.42.3.146]) by cs.rice.edu (Postfix) with ESMTP id F15FA4A9B6; Sun, 8 Sep 2002 22:40:33 -0500 (CDT) Original-Received: by bert.cs.rice.edu (Postfix, from userid 14314) id 2AC9337410A; Sun, 8 Sep 2002 22:40:33 -0500 (CDT) Original-To: ding@gnus.org In-Reply-To: Original-Lines: 92 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) X-Virus-Scanned: by AMaViS snapshot-20020300 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46443 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46443 On Sun, 08 Sep 2002 10:40:45 +0200, Jonas Steverud writes: > I have mail-source set to '((directory :path "~/Mail" :suffix "")) and > is using procmail to filter my email. I am using maildir because I don't trust anything else, especially over NFS. I use Safe-Cat to do mail-injection. (setq mail-sources '((maildir :path "~/Mesg/Spool/" :subdirs ("Inbox.Bulk" "Inbox.Spam" "Inbox.Rest")))) I am NOT using procmail for any actual catagorization.. IE, procmail dumps all mail into those 3 maildirs. Gnus reads all 3 of them. (The reason for this is so that I can 'less +/.*Rest.* ~/Mesg/Spool/logfile' and put 'less' into tail-mode and look for hilighted lines. Procmail does run some analysis routines, right now, Spamassassin, and in the future, maybe my bayes classifier or DNSRBL's. But gnus does the actual splitting into seperate folders. I do this because I don't really want to have two different levels and two/three different types of mail catagorization rules. Better to put them all in ONE system. So, I have all of my actual catagorization rules in nnmail-split-fancy... Which seems to be a nice superset of procmail anyways. I may later add in extra spamassassin rules 'FLAG_FOO' with low weights ~.000001 soley as flags for nnmail-split-fancy rules to match on: ("X-Spam-Status" "FLAG_PROJECT_FOO" "projects.foo"). Or, I may instead chose to do it via functional nnmail-split-fancy rules that scan the body for regexps. > My idea was to use mail splitting (maybe the fancy one too) and have > procmail do the spam filtering. I.e all mail except for spam are > placed in Mainmailbox and all spam are placed in Spam. Mainmailbox > should be splitted but the Spam box should not. > > Possible or are there a better solution? One option is to use 'formail' within procmail to put a special header on what you classify as spam and have the first split-fancy rule match on that header and put matching emails into the spam folder. (setq nnmail-split-fancy '(| ("My-Procmail-Classification" "Spam" "junk.spam") ("My-Procmail-Classification" "Family" "family") "inbox")) > I have fairly nice spam filtering in my procmail and I don't want to > rewrite it as splitting rules (takes too much time). I am also I'm curious.. What does your system look like? Why not rewrite it, piecemeal, into fancy-split-mail rules? split-fancy is so much nicer to use than procmail, its not funny. I put 5 pages of almost ununderstandable procmail rules into barely a screen of split-fancy rules. Not to mention.. split-fancy-with-parent is a GODSEND. Whomever wrote it.. THANK YOU![1] > planning to start using Spamassassin (the spam.el seems interesting, I > really like the idea with using BBDB as a whitelist since I consider > all mails from MSN, Hotmail, Yahoo et al as spam) so I seems to need > procmail however I do. Spamassassin offers an automatic whitelist option where it looks at the average score for email claiming to be from a particular user and adjusts itself as suited. With a threshold of 5, its had only one false-positive. (An orbitz confirmation email for some tickets I'd just bought.) > Or does someone have a script that converts a procmailrc to a > split rule(s)? ;-) Maybe you should write one? :) Scott [1] I do have one feature request.. It'd be nice if you could define a list of regexps that it was NOT to return. Something like: (defun my-split-fancy-with-parent () "Do a split-with-parent, however, ignore the result if it wants to put it in sent-mesg. This way, we put followups in the same group, however, we never put followups into sent-mesg." (let ((my-split (nnmail-split-fancy-with-parent))) ;;(message "Doing-my-split-fancy-with-parent") ;;(message my-split) (if (or (null my-split) (string-match "sent-mesg" my-split)) nil my-split)))