From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2912 Path: news.gmane.org!not-for-mail From: Thomas Mittelstaedt Newsgroups: gmane.emacs.gnus.user Subject: Re: splitting on body Date: 21 Aug 2003 23:53:48 +0200 Organization: tmstaedt Message-ID: <86d6ey8yoj.fsf@nan.here> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669180 16793 80.91.229.2 (31 Jan 2006 00:59:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:59:40 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:24 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!pd9e90b8a.dip0.t-ipconnect.DE!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: pd9e90b8a.dip0.t-ipconnect.de (217.233.11.138) Original-X-Trace: news.uni-berlin.de 1061502910 5135456 217.233.11.138 (16 [42627]) User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Biscayne) Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:3053 Original-Lines: 38 X-Gnus-Article-Number: 3053 Tue Jan 17 17:31:24 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2912 Archived-At: "Ketil Malde" writes: > Hi, > > I'm struggling to split messages based on body, using the example from > the Info manual: > > (defun split-on-body () > (save-excursion > (set-buffer " *nnmail incoming*") > (goto-char (point-min)) > (when (re-search-forward "Some.*string" nil t) > "string.group"))) > Why don't you use procmail to do split-on-body stuff? Insert some header in the procmail process and then use standard gnus splitting based on these special additional headers or move that mail to a special file. I, for instance, use a special header called X-SpamProbe to filter for spam. Here is the relevant part of my .procmailrc: :0 wf SCORE=| spamprobe -8 receive :0 wf | formail -I "X-SpamProbe: $SCORE" :0 a *^X-SpamProbe: SPAM spamprobe Did this help? -- Thomas Mittelstaedt Thomas Mittelstaedt