From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69331 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Sieve gets in infinite loop Date: Fri, 08 Jan 2010 16:56:18 +0100 Message-ID: <874omwegkd.fsf@mocca.josefsson.org> References: <87ws1msdgx.fsf@wanchan.jasonrumney.net> <87vdh3k73o.fsf@marauder.physik.uni-ulm.de> <4B4753BB.1020401@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262976038 8418 80.91.229.12 (8 Jan 2010 18:40:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jan 2010 18:40:38 +0000 (UTC) Cc: ding@gnus.org To: Jason Rumney Original-X-From: ding-owner+M17737@lists.math.uh.edu Fri Jan 08 19:40:31 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1NTJl8-0005VZ-M0 for ding-account@gmane.org; Fri, 08 Jan 2010 19:40:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1NTJkN-0001cu-KI; Fri, 08 Jan 2010 12:39:43 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1NTHCf-0000NC-7v for ding@lists.math.uh.edu; Fri, 08 Jan 2010 09:56:45 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1NTHCd-0000YL-Ay for ding@lists.math.uh.edu; Fri, 08 Jan 2010 09:56:45 -0600 Original-Received: from yxa-v.extundo.com ([83.241.177.39]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1NTHCU-0006lZ-00 for ; Fri, 08 Jan 2010 16:56:34 +0100 Original-Received: from mocca (c80-216-24-99.bredband.comhem.se [80.216.24.99]) (authenticated bits=0) by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5) with ESMTP id o08FuInp014917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 8 Jan 2010 16:56:19 +0100 OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:22:100108:jasonr@gnu.org::g6Q6B9Hgmave0Z3k:2SOv X-Hashcash: 1:22:100108:ding@gnus.org::QjqCrM36FUh14ehX:UoTS In-Reply-To: <4B4753BB.1020401@gnu.org> (Jason Rumney's message of "Fri, 08 Jan 2010 23:48:11 +0800") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00, DATE_IN_FUTURE_06_12,RDNS_DYNAMIC,SPF_FAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on yxa-v.extundo.com X-Virus-Scanned: clamav-milter 0.95.3 at yxa-v X-Virus-Status: Clean X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69331 Archived-At: Jason Rumney writes: > Reiner Steib wrote: >> On Thu, Nov 19 2009, Jason Rumney wrote: >> >> >>> My server sends the following non-matching line: >>> >>> OK "Dovecot ready." >>> >> >> I know next to nothing about sieve, but AFAICS, you (and your server) >> are right. Feel free to adjust sieve-manage-parse-capability-1 as >> needed. >> > > The following simple patch works for me, but I don't understand why > the eol needed to be on the regexp in the first place, so I may be > missing something. > > === modified file 'lisp/gnus/sieve-manage.el' > --- lisp/gnus/sieve-manage.el 2009-01-09 03:01:50 +0000 > +++ lisp/gnus/sieve-manage.el 2010-01-08 14:53:46 +0000 > @@ -636,7 +636,7 @@ > sieve-manage-capability)) > (push (list str) sieve-manage-capability)) > (forward-line))) > - (when (re-search-forward (concat "^OK" sieve-manage-server-eol) nil t) > + (when (re-search-forward "^OK" nil t) > (setq sieve-manage-state 'nonauth))) > > (defalias 'sieve-manage-parse-greeting-1 'sieve-manage-parse-capability-1) According to http://tools.ietf.org/html/draft-ietf-sieve-managesieve-09 the response line can contain an optional string: response-nobye = ("NO" / "BYE") [SP "(" resp-code ")"] [SP string] CRLF ;; The string contains human readable text ;; encoded as UTF-8. So how about - (when (re-search-forward (concat "^OK" sieve-manage-server-eol) nil t) + (when (re-search-forward (concat "^OK.*" sieve-manage-server-eol) nil t) instead? Not perfect, but hopefully would solve your problem and still match EOL stuff. /Simon