Your message dated Mon, 05 May 2008 16:17:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#479104: fixed in dovecot 1:1.0.13-4
has caused the Debian Bug report #479104,
regarding dovecot-common: cmusieve-plugins ignores folded headers
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
479104: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479104
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: dovecot-common
Version: 1:1.0.13-2
Severity: normal
Tags: patch

This bug was reported on the dovecot mailing list:
http://www.dovecot.org/list/dovecot/2008-March/029578.html
Timo provides a fix for this issue.:
http://www.dovecot.org/list/dovecot/2008-April/030295.html

I have attached the necessary code changes as patch (`hg diff -r27 -r33`).
It also includes some other small fixes and improvements.


Regards,
Pascal

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dovecot-common depends on:
ii  adduser               3.107              add and remove users and groups
ii  libc6                 2.7-10             GNU C Library: Shared libraries
ii  libcomerr2            1.40.8-2           common error description library
ii  libkrb53              1.6.dfsg.3~beta1-4 MIT Kerberos runtime libraries
ii  libldap-2.4-2         2.4.7-6.2          OpenLDAP libraries
ii  libmysqlclient15off   5.0.51a-3          MySQL database client library
ii  libpam-runtime        0.99.7.1-6         Runtime support for the PAM librar
ii  libpam0g              0.99.7.1-6         Pluggable Authentication Modules l
ii  libpq5                8.3.1-1            PostgreSQL C client library
ii  libsqlite3-0          3.5.8-1            SQLite 3 shared library
ii  libssl0.9.8           0.9.8g-8           SSL shared libraries
ii  openssl               0.9.8g-8           Secure Socket Layer (SSL) binary a
ii  ucf                   3.006              Update Configuration File: preserv
ii  zlib1g                1:1.2.3.3.dfsg-12  compression library - runtime

dovecot-common recommends no packages.

-- no debconf information
diff -r 9137442dd18a -r 5c3ba11994cb src/cmusieve-plugin.c
--- a/src/cmusieve-plugin.c	Wed Aug 01 15:02:51 2007 +0300
+++ b/src/cmusieve-plugin.c	Fri Apr 25 02:54:13 2008 +0300
@@ -27,6 +27,7 @@
 			/* disabled */
 			return NULL;
 		}
+		script_path = home_expand(script_path);
 
 		if (*script_path != '/' && *script_path != '\0') {
 			/* relative path. change to absolute. */
@@ -35,10 +36,8 @@
 		}
 	} else {
 		if (home == NULL) {
-			/* we must have a home directory */
-			i_error("userdb(%s) didn't return a home directory or "
-				"sieve script location, can't find it",
-				getenv("USER"));
+			i_error("Per-user script path is unknown. See "
+				"http://wiki.dovecot.org/LDA/Sieve#location";);
 			return NULL;
 		}
 
diff -r 9137442dd18a -r 5c3ba11994cb src/libsieve/bc_eval.c
--- a/src/libsieve/bc_eval.c	Wed Aug 01 15:02:51 2007 +0300
+++ b/src/libsieve/bc_eval.c	Fri Apr 25 02:54:13 2008 +0300
@@ -124,7 +124,7 @@
     if (!strncasecmp(addr, "majordomo", 9))
 	return 1;
 
-    if (strstr(addr, "-request"))
+    if (strstr(addr, "-request@"))
 	return 1;
 
     if (!strncmp(addr, "owner-", 6))
@@ -186,6 +186,17 @@
 
     return found;
 }
+
+static char *list_fields[] = {
+    "list-id",
+    "list-help",
+    "list-subscribe",
+    "list-unsubscribe",
+    "list-post",
+    "list-owner",
+    "list-archive",
+    NULL
+};
  
 /* Determine if we should respond to a vacation message */
 static int shouldRespond(void * m, sieve_interp_t *interp,
@@ -195,14 +206,28 @@
     const char **body;
     char buf[128];
     char *myaddr = NULL;
-    int l = SIEVE_OK;
+    int l = SIEVE_OK, j;
     void *data = NULL, *marker = NULL;
     char *tmp;
     int curra, x;
     char *found=NULL;
     char *reply_to=NULL;
   
-    /* is there an Auto-Submitted keyword other than "no"? */
+    /* Implementations SHOULD NOT respond to any message that contains a
+       "List-Id" [RFC2919], "List-Help", "List-Subscribe", "List-
+       Unsubscribe", "List-Post", "List-Owner" or "List-Archive" [RFC2369]
+       header field. */
+    for (j = 0; list_fields[j]; j++) {
+	strcpy(buf, list_fields[j]);
+	if (interp->getheader(m, buf, &body) == SIEVE_OK) {
+	    l = SIEVE_DONE;
+	    break;
+	}
+    }
+
+    /* Implementations SHOULD NOT respond to any message that has an
+       "Auto-submitted" header field with a value other than "no".
+       This header field is described in [RFC3834]. */
     strcpy(buf, "auto-submitted");
     if (interp->getheader(m, buf, &body) == SIEVE_OK) {
 	/* we don't deal with comments, etc. here */
@@ -212,6 +237,7 @@
     }
 
     /* is there a Precedence keyword of "junk | bulk | list"? */
+    /* XXX  non-standard header, but worth checking */
     strcpy(buf, "precedence");
     if (interp->getheader(m, buf, &body) == SIEVE_OK) {
 	/* we don't deal with comments, etc. here */
@@ -282,7 +308,7 @@
     if (l == SIEVE_OK) {
 	/* ok, we're willing to respond to the sender.
 	   but is this message to me?  that is, is my address
-	   in the TO, CC or BCC fields? */
+	   in the [Resent]-To, [Resent]-Cc or [Resent]-Bcc fields? */
 	if (strcpy(buf, "to"), 
 	    interp->getheader(m, buf, &body) == SIEVE_OK)
 	    found = look_for_me(myaddr, numaddresses ,bc, i, body);
@@ -290,6 +316,15 @@
 		       (interp->getheader(m, buf, &body) == SIEVE_OK)))
 	    found = look_for_me(myaddr, numaddresses, bc, i, body);
 	if (!found && (strcpy(buf, "bcc"),
+		       (interp->getheader(m, buf, &body) == SIEVE_OK)))
+	    found = look_for_me(myaddr, numaddresses, bc, i, body);
+	if (!found && (strcpy(buf, "resent-to"), 
+		       (interp->getheader(m, buf, &body) == SIEVE_OK)))
+	    found = look_for_me(myaddr, numaddresses ,bc, i, body);
+	if (!found && (strcpy(buf, "resent-cc"),
+		       (interp->getheader(m, buf, &body) == SIEVE_OK)))
+	    found = look_for_me(myaddr, numaddresses, bc, i, body);
+	if (!found && (strcpy(buf, "resent-bcc"),
 		       (interp->getheader(m, buf, &body) == SIEVE_OK)))
 	    found = look_for_me(myaddr, numaddresses, bc, i, body);
 	if (!found)
@@ -1093,10 +1128,7 @@
 			/* s[0] contains the original subject */
 			const char *origsubj = s[0];
 
-			while (!strncasecmp(origsubj, "Re: ", 4)) 
-			    origsubj += 4;
-
-			snprintf(subject, sizeof(subject), "Re: %s", origsubj);
+			snprintf(subject, sizeof(subject), "Auto: %s", origsubj);
 		    }
 		} else {
 		    /* user specified subject */
diff -r 9137442dd18a -r 5c3ba11994cb src/sieve-cmu.c
--- a/src/sieve-cmu.c	Wed Aug 01 15:02:51 2007 +0300
+++ b/src/sieve-cmu.c	Fri Apr 25 02:54:13 2008 +0300
@@ -39,13 +39,69 @@
 	const char *temp[10];
 } sieve_msgdata_t;
 
+static const char *unfold_header(const char *str)
+{
+	char *new_str;
+	unsigned int i, j;
+
+	for (i = 0; str[i] != '\0'; i++) {
+		if (str[i] == '\n')
+			break;
+	}
+	if (str[i] == '\0')
+		return str;
+
+	/* @UNSAFE */
+	new_str = t_malloc(i + strlen(str+i) + 1);
+	memcpy(new_str, str, i);
+	for (j = i; str[i] != '\0'; i++) {
+		if (str[i] == '\n') {
+			new_str[j++] = ' ';
+			i++;
+			i_assert(str[i] == ' ' || str[i] == '\t');
+		} else {
+			new_str[j++] = str[i];
+		}
+	}
+	new_str[j] = '\0';
+	return new_str;
+}
+
+static const char *const *
+unfold_multiline_headers(const char *const *headers)
+{
+	const char **new_headers;
+	unsigned int i;
+
+	/* see if there are any multiline headers */
+	for (i = 0; headers[i] != NULL; i++) {
+		if (strchr(headers[i], '\n') != NULL)
+			break;
+	}
+	if (headers[i] == NULL) {
+		/* no multilines */
+		return headers;
+	}
+
+	/* @UNSAFE */
+	for (; headers[i] != NULL; i++) ;
+	new_headers = t_new(const char *, i + 1);
+	for (i = 0; headers[i] != NULL; i++)
+		new_headers[i] = unfold_header(headers[i]);
+	return new_headers;
+}
+
 /* gets the header "head" from msg. */
 static int getheader(void *v, const char *phead, const char ***body)
 {
     sieve_msgdata_t *m = v;
+    const char *const *headers;
 
     if (phead==NULL) return SIEVE_FAIL;
-    *body = (const char **)mail_get_headers(m->mail, phead);
+    headers = mail_get_headers(m->mail, phead);
+    if (headers != NULL)
+	    headers = unfold_multiline_headers(headers);
+    *body = (const char **)headers;
 
     if (*body) {
 	return SIEVE_OK;
@@ -346,23 +402,25 @@
 static int autorespond(void *ac, 
 		       void *ic __attr_unused__,
 		       void *sc,
-		       void *mc __attr_unused__,
+		       void *mc,
 		       const char **errmsg __attr_unused__)
 {
     sieve_autorespond_context_t *arc = (sieve_autorespond_context_t *) ac;
     script_data_t *sd = (script_data_t *) sc;
-    int ret;
+    sieve_msgdata_t *md = mc;
 
     /* ok, let's see if we've responded before */
-    ret = duplicate_check(arc->hash, arc->len,  sd->username) ?
-	    SIEVE_DONE : SIEVE_OK;
-
-    if (ret == SIEVE_OK) {
-	duplicate_mark(arc->hash, arc->len, sd->username,
-		       ioloop_time + arc->days * (24 * 60 * 60));
+    if (duplicate_check(arc->hash, arc->len,  sd->username)) {
+	i_info("msgid=%s: discarded duplicate vacation response to <%s>",
+	       md->id == NULL ? "" : str_sanitize(md->id, 80),
+	       str_sanitize(md->return_path, 80));
+	return SIEVE_DONE;
     }
 
-    return ret;
+    duplicate_mark(arc->hash, arc->len, sd->username,
+                   ioloop_time + arc->days * (24 * 60 * 60));
+
+    return SIEVE_OK;
 }
 
 static int send_response(void *ac, 
@@ -409,6 +467,9 @@
     if (smtp_client_close(smtp_client) == 0) {
         duplicate_mark(outmsgid, strlen(outmsgid),
                        sdata->username, ioloop_time + DUPLICATE_DEFAULT_KEEP);
+	i_info("msgid=%s: sent vacation response to <%s>",
+	       md->id == NULL ? "" : str_sanitize(md->id, 80),
+	       str_sanitize(md->return_path, 80));
 	return SIEVE_OK;
     } else {
 	*errmsg = "Error sending mail";
@@ -533,7 +594,7 @@
 			return -1;
 		}
 	} else {
-		if (st.st_mtime < st2.st_mtime)
+		if (st.st_mtime <= st2.st_mtime)
 			return 1;
 	}
 

--- End Message ---
--- Begin Message ---
Source: dovecot
Source-Version: 1:1.0.13-4

We believe that the bug you reported is fixed in the latest version of
dovecot, which is due to be installed in the Debian FTP archive:

dovecot-common_1.0.13-4_amd64.deb
  to pool/main/d/dovecot/dovecot-common_1.0.13-4_amd64.deb
dovecot-dev_1.0.13-4_amd64.deb
  to pool/main/d/dovecot/dovecot-dev_1.0.13-4_amd64.deb
dovecot-imapd_1.0.13-4_amd64.deb
  to pool/main/d/dovecot/dovecot-imapd_1.0.13-4_amd64.deb
dovecot-pop3d_1.0.13-4_amd64.deb
  to pool/main/d/dovecot/dovecot-pop3d_1.0.13-4_amd64.deb
dovecot_1.0.13-4.diff.gz
  to pool/main/d/dovecot/dovecot_1.0.13-4.diff.gz
dovecot_1.0.13-4.dsc
  to pool/main/d/dovecot/dovecot_1.0.13-4.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Fabio Tranchitella <[EMAIL PROTECTED]> (supplier of updated dovecot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 05 May 2008 17:28:21 +0200
Source: dovecot
Binary: dovecot-common dovecot-dev dovecot-imapd dovecot-pop3d
Architecture: source amd64
Version: 1:1.0.13-4
Distribution: unstable
Urgency: low
Maintainer: Dovecot Maintainers <[EMAIL PROTECTED]>
Changed-By: Fabio Tranchitella <[EMAIL PROTECTED]>
Description: 
 dovecot-common - secure mail server that supports mbox and maildir mailboxes
 dovecot-dev - header files for the dovecot mail server
 dovecot-imapd - secure IMAP server that supports mbox and maildir mailboxes
 dovecot-pop3d - secure POP3 server that supports mbox and maildir mailboxes
Closes: 479059 479104
Changes: 
 dovecot (1:1.0.13-4) unstable; urgency=low
 .
   * debian/patches/dovecot-MANAGESIEVE-9.3.dpatch: updated managesieve to
     version 9.3.
   * debian/dovecot-common.README.Debian: added a note about how to configure
     dovecot to log to file instead of using syslog.
   * debian/dovecot.1: added a SIGNALS section. (Closes: #479059)
   * dovecot-sieve: updated to the last hg release (5c3ba11994cb).
     (Closes: #479104)
Checksums-Sha1: 
 440ba0cbf736ce48b722261cd060089cbde9864f 1569 dovecot_1.0.13-4.dsc
 49f2a6064e9d1d86ebf0d293a1a60b76122e10eb 219568 dovecot_1.0.13-4.diff.gz
 e6f1c1eb565aee2ce15e7432e1431014d66da87e 2068388 
dovecot-common_1.0.13-4_amd64.deb
 3b567011eed2b9a86ee70acb9c4b48104554c347 387460 dovecot-dev_1.0.13-4_amd64.deb
 ec070769e3e9324906358c3448116391203c9cbc 660030 
dovecot-imapd_1.0.13-4_amd64.deb
 69673a8639d3e8615d8b869b6fae287788845266 622836 
dovecot-pop3d_1.0.13-4_amd64.deb
Checksums-Sha256: 
 6c84b0ba4d5c0207a80ff1a01c15760a6db5b512dd3cc9ae4aa73cb8b8bdd9c5 1569 
dovecot_1.0.13-4.dsc
 1ef044866846f441a38f534480925b9d12cb82fd5c202bb40a9100bd9ac3bdf5 219568 
dovecot_1.0.13-4.diff.gz
 2f8b972c7d1b44477ad2784679c7d2e234338ec28b5901964bf80c73c36414c0 2068388 
dovecot-common_1.0.13-4_amd64.deb
 5dae7db6f2fd9a9eb4f11b641517fd71fff42f06b49ca5f8f05df0a10170ca22 387460 
dovecot-dev_1.0.13-4_amd64.deb
 9943dd258bf80cf6e5cdb9832eea1e54682ba7f785a5ce3801fcd8b88dd1aaa2 660030 
dovecot-imapd_1.0.13-4_amd64.deb
 63fb08c37722c4e964940ffaabe7e6d713c45e42c72d17ede6a73314504dfa0b 622836 
dovecot-pop3d_1.0.13-4_amd64.deb
Files: 
 4d8f4c4797fb3167b212ca14e472db25 1569 mail optional dovecot_1.0.13-4.dsc
 2f833542fe546a022c278c0f63947a40 219568 mail optional dovecot_1.0.13-4.diff.gz
 874dc73942b7438ff3b197af3f287f39 2068388 mail optional 
dovecot-common_1.0.13-4_amd64.deb
 482253ba5b6c852a9ad594d2d6fbdeb5 387460 mail optional 
dovecot-dev_1.0.13-4_amd64.deb
 493e8f87140110b6a7c7f31ab1981923 660030 mail optional 
dovecot-imapd_1.0.13-4_amd64.deb
 28fae59c0c1b0647a33805b17a5e5d88 622836 mail optional 
dovecot-pop3d_1.0.13-4_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIHzB7K/juK3+WFWQRAngmAJ9xWpn6CykMvTpq1Cyi1FlGmEPQvwCfSohZ
as1EMFxAB3QLzV0mN2orgtI=
=VMd+
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to