From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39938 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: possible gnus-sieve bug Date: Sat, 3 Nov 2001 20:06:03 +0100 (CET) Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1035175569 30632 80.91.224.250 (21 Oct 2002 04:46:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:46:09 +0000 (UTC) Cc: Return-Path: Original-Received: (qmail 14740 invoked from network); 3 Nov 2001 19:06:47 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 3 Nov 2001 19:06:47 -0000 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 16067i-0000Hx-00; Sat, 03 Nov 2001 13:06:30 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 03 Nov 2001 13:06:12 -0600 (CST) 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 NAA03351 for ; Sat, 3 Nov 2001 13:06:03 -0600 (CST) Original-Received: (qmail 14726 invoked by alias); 3 Nov 2001 19:06:16 -0000 Original-Received: (qmail 14720 invoked from network); 3 Nov 2001 19:06:16 -0000 Original-Received: from slipsten.extundo.com (195.42.214.241) by gnus.org with SMTP; 3 Nov 2001 19:06:16 -0000 Original-Received: from localhost (jas@localhost) by slipsten.extundo.com (8.11.6/8.11.6) with ESMTP id fA3J63x01416; Sat, 3 Nov 2001 20:06:03 +0100 X-Authentication-Warning: slipsten.extundo.com: jas owned process doing -bs Original-To: NAGY Andras In-Reply-To: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39938 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39938 On Sat, 3 Nov 2001, NAGY Andras wrote: > Gnus-sieve has this function: > > (defun gnus-sieve-guess-rule-for-article () > "Guess a sieve rule based on RFC822 article in buffer. > Return NIL if no rule could be guessed." > (when (message-fetch-field "sender") > `(sieve address "sender" ,(regexp-quote (message-fetch-field "sender"))))) > > AFAIK, the default `comparator' in Sieve tests is `:is' (exact match), > therefore the regexp-quote is not required here; actually I think > rules generated this way should not work at all. What do you think? Arhm, erhm, well, Cyrus Sieve uses fnmatch() even with :is (I believe) which is sort of like regexps, so I escaped the rule. Now, future version will probably do the escaping in the server (this was recently discussed on the cyrus-imap list) so maybe we should remove it. (But I haven't upgraded yet...) But yes, it is wrong. OTOH it would be nice to rewrite the function into something much more intelligent and with a nicer interface.