[Dovecot] Problem redirecting email using pigeonhole 0.4.0 (with patch)

Andriy Syrovenko andriys at gmail.com
Sun Jun 9 00:37:34 EEST 2013


Starting from the version 0.4.0 Pigeonhole adds "X-Sieve" and
"X-Sieve-Redirected-From" headers ending them with CR+LF, and then
copies the original message (including original headers) ending the
lines with LF-only. This causes troubles at least if using Exim (I
have not checked with other MTAs)- original message gets dropped, and
only the new pigeonhole-generated headers are sent out. The attached
file fixed the problem for me.

--- dovecot-2.2-pigeonhole-0.4.0.orig/src/lib-sieve/cmd-redirect.c	2013-04-07
01:57:26.000000000 +0300
+++ dovecot-2.2-pigeonhole-0.4.0/src/lib-sieve/cmd-redirect.c	2013-06-05
03:22:53.000000000 +0300
@@ -344,9 +344,9 @@
 		string_t *hdr = t_str_new(256);

 		/* Prepend sieve headers (should not affect signatures) */
-		rfc2822_header_write(hdr, "X-Sieve", SIEVE_IMPLEMENTATION);
+		rfc2822_header_append(hdr, "X-Sieve", SIEVE_IMPLEMENTATION, FALSE, NULL);
 		if ( recipient != NULL )
-			rfc2822_header_write(hdr, "X-Sieve-Redirected-From", recipient);
+			rfc2822_header_append(hdr, "X-Sieve-Redirected-From", recipient,
 	  o_stream_send(output, str_data(hdr), str_len(hdr));
 	} T_END;

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crlf.patch
Type: application/octet-stream
Size: 838 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20130609/f9a35d0a/attachment-0001.obj>

More information about the dovecot mailing list