Andriy Syrovenko
2013-Jun-08 21:37 UTC
[Dovecot] Problem redirecting email using pigeonhole 0.4.0 (with patch)
Hello, 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, FALSE, NULL); o_stream_send(output, str_data(hdr), str_len(hdr)); } T_END; Best regards, Andrey. -------------- 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>
Stephan Bosch
2013-Jun-18 06:40 UTC
[Dovecot] Problem redirecting email using pigeonhole 0.4.0 (with patch)
On 6/8/2013 11:37 PM, Andriy Syrovenko wrote:> Hello, > > 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.Applied: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/e439789e3211 I hope I can restructure LDA mail submission a bit when I finish lib-smtp, avoiding useless conversions between CRLF and LF line endings. Regards, Stephan.
Reasonably Related Threads
- Problem with forward prediction using StructTS output
- Ignored proxy_maybe var and no local login when "host = Proxy FQDN"
- sieve redirect action
- piegonhole sieve prepending header lines with an extra space
- Samba 3.5.6 - numerous regressions while running as AD member against Samba4alpha14 DC