From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/10722 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.gnus.user Subject: Re: mail splitting doesn't work Date: Thu, 27 Mar 2008 00:52:46 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87ve39m729.fsf@kobe.laptop> References: <87veends6d.fsf@thalassa.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206583615 11418 80.91.229.12 (27 Mar 2008 02:06:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2008 02:06:55 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Thu Mar 27 03:07:26 2008 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JehWX-0004Da-5a for gegu-info-gnus-english@m.gmane.org; Thu, 27 Mar 2008 03:07:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JehVv-0005yM-R5 for gegu-info-gnus-english@m.gmane.org; Wed, 26 Mar 2008 22:06:47 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:wv0FslATl6iHp47qWabMoDad6Y8= Original-Lines: 61 Original-NNTP-Posting-Host: 77.49.150.31 Original-X-Trace: news.sunsite.dk DXC=iakn5P0Sc_VCmP]hZYSB=nbEKnk[f2; 89Q0P2=RL^MjWbH?lJH1Tkj\oZlOT9=F8D_kcKJO2@f]R] Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.gnus:80936 X-Mailman-Approved-At: Wed, 26 Mar 2008 22:06:46 -0400 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:10722 Archived-At: On Mon, 21 May 2007 00:52:10 +0200, Pascal Bourguignon wrote: > I customized nnmail split as indicated in info for gnu, but it doesn't > work, no splitting occurs either when I fetch new mail nor when I > respool the bogus mail group where all mails land eventually... > > (custom-set-variables > '(nnmail-split-fancy > (quote (| (: nnmail-split-fancy-with-parent) > ("From:" ".*Cron Daemon.*" "mail.cron") > (To: ".*vms-list@voynich.net.*" "mail.voynich") > (From: ".*gentoo.*" "mail.gentoo") > (From: ".*zenith.*@zenit.org.*" "mail.zenith") > (To: ".*\\(lisp.it\\|slime.*@common-lisp.net\\).*" "mail.lisp") > (From: ".*\\(@freelance.com\\|@dice.com\\).*" "mail.jobs")))) > '(nnmail-split-methods (quote nnmail-split-fancy)) > '(gnus-secondary-select-methods (quote ((nnml ""))))) > > What should I do to have my emails split into the right groups? Hi Pascal, As Katsumi Yamaoka-san has written, you have to use either a string in the first element of each `split', or one of the supported keywords (extending the keyword list is easy too, but it's not necessary here). The above split could be written as: '(| (: nnmail-split-fancy-with-parent) (from ".*cron daemon.*" "mail.cron") (to ".*vms-list@voynich.net.*" "mail.voynich") (from ".*gentoo.*" "mail.gentoo") (from ".*zenith.*@zenit.org.*" "mail.zenith") (to ".*\\(lisp.it\\|slime.*@common-lisp.net\\).*" "mail.lisp") (from ".*\\(@freelance.com\\|@dice.com\\).*" "mail.jobs")))) The nice thing about keywords is that they match more than one type of email header: ,----[ Gnus manual. Node: Fancy Mail Splitting ]----------------------- | | Predefined entries in `nnmail-split-abbrev-alist' include: | | `from' | Matches the `From', `Sender' and `Resent-From' fields. | | `to' | Matches the `To', `Cc', `Apparently-To', `Resent-To' and | `Resent-Cc' fields. | | `any' | Is the union of the `from' and `to' entries. | `----------------------------------------------------------------------- The `from' keyword is probably less useful if you only want to split on the "From:" header, but the `to' keyword is my all times favorite :-) Cheers, Giorgos