Hi all, I would like to see an upload of avelsieve accepted to stable-p-u. A few weeks before the stable release I fixed an important bug for dovecot users using the sieve capabilities via avelsieve. Unfortunately I lost track of that with an upload of a new upstream version which didn't make it into lenny. There are two different patches, one for a small bug which makes deleting the last sieve rule impossible, and another one for proper use with dovecot-imap. A user just asked to include these patches in lenny by filing a grave bug. I don't consider this issue as grave but it at least shows the impact of the missing patches for dovecot users. Since I'm not a DD yet I need someone to sponsor this upload. The package is prepared on mentors [1] and a full diff is attached. Thanks for considering, Hauke [1] http://mentors.debian.net/debian/pool/main/a/avelsieve/avelsieve_1.9.7-6+lenny1.dsc
Index: debian/control
===================================================================
--- debian/control (Revision 379)
+++ debian/control (Arbeitskopie)
@@ -12,7 +12,7 @@
Package: avelsieve
Architecture: all
Depends: squirrelmail (>= 2:1.4.9), debconf (>= 1.4.69) | cdebconf (>= 0.39)
-Suggests: cyrus-imapd-2.2
+Suggests: cyrus-imapd-2.2 | dovecot-imapd
Description: Sieve mail filters plugin for SquirrelMail
Avelsieve is a plugin for the SquirrelMail webmail system which allows
users to create mail filtering scripts on Sieve-compliant mail servers.
Index: debian/changelog
===================================================================
--- debian/changelog (Revision 379)
+++ debian/changelog (Arbeitskopie)
@@ -1,3 +1,11 @@
+avelsieve (1.9.7-6+lenny1) stable; urgency=medium
+
+ * Fix "fails to display filters after initial creation using dovecot's
+ managesieve" by introducing patches acknowledged by upstream
+ (Closes: #542539)
+
+ -- Jan Hauke Rahm <info@jhr-online.de> Tue, 25 Aug 2009 09:35:27 +0200
+
avelsieve (1.9.7-6) unstable; urgency=low
* Debconf translation update for Italian (Closes: #505095)
Index: debian/patches/04_delete_last_rule.dpatch
===================================================================
--- debian/patches/04_delete_last_rule.dpatch (Revision 0)
+++ debian/patches/04_delete_last_rule.dpatch (Revision 0)
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_delete_last_rule.dpatch by Jan Hauke Rahm <info@jhr-online.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make possible to delete last rule
+
+@DPATCH@
+diff -urNad avelsieve~/table.php avelsieve/table.php
+--- avelsieve~/table.php 2008-12-17 22:18:01.000000000 +0100
++++ avelsieve/table.php 2009-01-04 17:10:35.225379232 +0100
+@@ -162,6 +162,7 @@
+ if (!$conservative) {
+ $s->login();
+ if(sizeof($rules) == 0) {
++ $s->setactive('');
+ $s->delete('phpscript');
+ } else {
+ $newscript = makesieverule($rules);
Index: debian/patches/05_dovecot.dpatch
===================================================================
--- debian/patches/05_dovecot.dpatch (Revision 0)
+++ debian/patches/05_dovecot.dpatch (Revision 0)
@@ -0,0 +1,96 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_dovecot.dpatch by Jan Hauke Rahm <info@jhr-online.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make avelsieve work properly with dovecot
+
+@DPATCH@
+diff -urNad avelsieve~/include/managesieve.lib.php avelsieve/include/managesieve.lib.php
+--- avelsieve~/include/managesieve.lib.php 2008-12-17 22:18:01.000000000 +0100
++++ avelsieve/include/managesieve.lib.php 2009-01-04 17:13:26.165381131 +0100
+@@ -82,6 +82,12 @@
+ * a comma seperated list of allowed auth types, in order of preference
+ */
+ var $auth_types;
++
++ /**
++ * options
++ */
++ var $broken_tls;
++
+ /**
+ * type of authentication attempted
+ */
+@@ -311,6 +317,9 @@
+ else
+ $this->auth = $auth;
+ $this->auth_types=$auth_types; /* Allowed authentication types */
++
++ $this->broken_tls = false;
++
+ $this->fp=0;
+ $this->line="";
+ $this->retval="";
+@@ -484,6 +493,10 @@
+ } /* end if */
+ elseif(is_string($this->modules))
+ $this->capabilites[$this->cap_type][$this->module]=true;
++
++ // set broken_tls. Older cyrus servers do not respond with
++ // capabilities after STARTTLS
++ $broken_tls = true;
+ }
+
+ if(sieve::status($this->line) == F_NO){ //here we should do some returning of error codes?
+@@ -504,8 +517,13 @@
+ return false;
+ } else {
+ $this->loggedin = true;
+- // RFC says that we need to ask for the capabilities again
+- $this->sieve_get_capability();
++ // RFC says that we get an unsolicited capability response after TLS negotiation. Older Cyrus
++ // did not do this. If the server has old/broken TLS we need to send a CAPABILITY command,
++ // otherwise we just parse the unsolicited capability response.
++ if ( $this->broken_tls )
++ $this->sieve_get_capability();
++ else
++ $this->sieve_read_capability_response();
+ $this->loggedin = false;
+ }
+ }
+@@ -817,14 +835,11 @@
+ }
+
+ /**
+- * Return an array of available capabilities.
++ * Read incoming capability response.
+ *
+ * @return array
+ */
+- function sieve_get_capability() {
+- if($this->loggedin==false)
+- return false;
+- fputs($this->fp, "CAPABILITY\r\n");
++ function sieve_read_capability_response() {
+ $this->line=fgets($this->fp,1024);
+
+ $tmp = array();
+@@ -876,6 +891,18 @@
+ return $this->capabilities['modules'];
+ }
+
++ /**
++ * Return an array of available capabilities.
++ *
++ * @return array
++ */
++ function sieve_get_capability() {
++ if($this->loggedin==false)
++ return false;
++ fputs($this->fp, "CAPABILITY\r\n");
++
++ return $this->sieve_read_capability_response();
++ }
+ }
+
+
Index: debian/patches/00list
===================================================================
--- debian/patches/00list (Revision 379)
+++ debian/patches/00list (Arbeitskopie)
@@ -1,3 +1,5 @@
01_foldersort_bugfix.dpatch
02_add_debian_mailheaders.dpatch
03_typo_in_mailheaders.dpatch
+04_delete_last_rule.dpatch
+05_dovecot.dpatch
Attachment:
signature.asc
Description: Digital signature