Sieve seems to break mailbody during automatic redirection

Frank Leonhardt (M) frank2 at fjl.co.uk
Mon Jun 30 10:59:47 UTC 2014


In case this helps, ctrl-m (0x0d) is ASCII carriage return. Ctrl-a (0x0a) is line feed. On old mechanical terminal (e.g. Teletype) you needed both to get to start of new line. CP/M, on which MS-DOS was based maintained this. UNIX used just 0x0a for new line. AppleDOS used just 0x0d. And it's been a PITA ever since as nothing based on these early systems has ever changed. IBM didn't use ASCII, so be glad there are only three "standards"

Regards, Frank


On June 30, 2014 10:09:54 AM GMT+01:00, Urban Loesch <bind at enas.net> wrote:
>Hi,
>
>I have a strange problem with sieve.
>After upgrading to 2.2.13 sieve seems to break the mailbody during
>automatic redirection.
>
>I have the following configuration.
>
>- User A sends mail to User B.
>- User B has an automatic redirect to User C
>- User C geht the mailbody broken
>
>I did some debugging.
>
>
>This is a part of the mailbody which i grabbed from the mailqueue
>before the mail gets delivered to user B:
>
>...
>Message-ID: <53B12105.2020207 at domain.net>
>Date: Mon, 30 Jun 2014 10:34:13 +0200
>From: =?ISO-8859-15?Q?Urban_L=F6sch_Enas?= <userA at domain.net>
>User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101
>Thunderbird/24.2.0
>MIME-Version: 1.0
>To: Urban Loesch <userB at domain.net>
>Subject: testmail 5
>X-Enigmail-Version: 1.6
>Content-Type: multipart/mixed;
> boundary="------------040308070600090201000704"
>
>This is a multi-part message in MIME format.
>--------------040308070600090201000704
>Content-Type: text/plain; charset=ISO-8859-15
>Content-Transfer-Encoding: 7bit
>
>
>--------------040308070600090201000704
>Content-Type: application/rtf;
> name="elenco_siti_inibiti.2.rtf"
>Content-Transfer-Encoding: base64
>Content-Disposition: attachment;
> filename="elenco_siti_inibiti.2.rtf"
>
>e1xydGYxXGFkZWZsYW5nMTAyNVxhbnNpXGFuc2ljcGcxMjUyXHVjMVxhZGVmZjBcZGVmZjBc
>c3RzaGZkYmNoMFxzdHNoZmxvY2gwXHN0c2hmaGljaDBc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O30NCntcZjE2XGZiaWRpIFxmc3dp
>c3NcZmNoYXJzZXQxMjlcZnBycTJ7XCpccGFub3NlIDAyMGIwNjAwMDAwMTAxMDEwMTAxfURv
>dHVte1wqXGZhbHQgPz8/Pz9FPz9jRT8/Pz8/RWNFPz8/Pz9FPz8/Pz9FY307fXtcZjE3XGZi
>aWRpIFxmbW9kZXJuXGZjaGFyc2V0MTM0XGZwcnExe1wqXHBhbm9zZSAwMjAxMDYwOTA2MDEw
>MTAxMDEwMX1TaW1IZWl7XCpcZmFsdCBvPz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/
>fTt9DQp7XGYxOFxmYmlkaSBcZm1vZGVyblxmY2hhcnNldDEzNlxmcHJxMXtcKlxwYW5vc2Ug
>...
>
>Looks normal to me.
>
>Now:
>This is the part of the mailbody which i grabbed from the mailqueue
>after user B has received the mail and sieve has injectd
>it to the mailqueue for delivering to user C.
>
>...
>Message-ID: <53B12105.2020207 at domain.net>
>Date: Mon, 30 Jun 2014 10:34:13 +0200
>From: =?ISO-8859-15?Q?Urban_L=F6sch_Enas?= <userA at domain.net>
>User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101
>Thunderbird/24.2.0
>MIME-Version: 1.0
>To: Urban Loesch <userB at domain.net>
>Subject: testmail 5
>X-Enigmail-Version: 1.6
>Content-Type: multipart/mixed;
> boundary="------------040308070600090201000704"
>
>This is a multi-part message in MIME format.^M
>--------------040308070600090201000704^M
>Content-Type: text/plain; charset=ISO-8859-15^M
>Content-Transfer-Encoding: 7bit^M
>^M
>^M
>--------------040308070600090201000704^M
>Content-Type: application/rtf;^M
> name="elenco_siti_inibiti.2.rtf"^M
>Content-Transfer-Encoding: base64^M
>Content-Disposition: attachment;^M
> filename="elenco_siti_inibiti.2.rtf"^M
>^M
>e1xydGYxXGFkZWZsYW5nMTAyNVxhbnNpXGFuc2ljcGcxMjUyXHVjMVxhZGVmZjBcZGVmZjBc^M
>c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QxMjhcZnBycTF7XCpccGFub3NlIDAyMGIwNjA5MDcwMjA1MDgwMjA0^M
>fU1TIEdvdGhpY3tcKlxmYWx0ID9sP3IgP1M/Vj9iP059O30NCntcZjE2XGZiaWRpIFxmc3dp^M
>c3NcZmNoYXJzZXQxMjlcZnBycTJ7XCpccGFub3NlIDAyMGIwNjAwMDAwMTAxMDEwMTAxfURv^M
>dHVte1wqXGZhbHQgPz8/Pz9FPz9jRT8/Pz8/RWNFPz8/Pz9FPz8/Pz9FY307fXtcZjE3XGZi^M
>aWRpIFxmbW9kZXJuXGZjaGFyc2V0MTM0XGZwcnExe1wqXHBhbm9zZSAwMjAxMDYwOTA2MDEw^M
>MTAxMDEwMX1TaW1IZWl7XCpcZmFsdCBvPz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/^M
>fTt9DQp7XGYxOFxmYmlkaSBcZm1vZGVyblxmY2hhcnNldDEzNlxmcHJxMXtcKlxwYW5vc2Ug^M
>MDIwMjA1MDkwMDAwMDAwMDAwMDB9TWluZ0xpVXtcKlxmYWx0IDJPY3VBZX07fXtcZjE5XGZi^M
>aWRpIFxmcm9tYW5cZmNoYXJzZXQxMjhcZnBycTF7XCpccGFub3NlIDAyMDIwNjA5MDQwMzA1^M
>MDgwMzA1fU1pbmNob3tcKlxmYWx0ID8/XCc4MVwnNjZjfTt9DQp7XGYyMFxmYmlkaSBcZnN3^M
>...
>
>The part of the mail-header looks normal.
>
>But as you can see at beginning of the mailbody something inserts the
>strange character "^M"
>after each newline. According to Google this is a endline charachter
>from Windows. And this
>seems to break some clients (Eg. Lotus Notes).
>
>With dovecot version 2.1.x I don't have this problem.
>
>Have you any solution for me?
>
>Many thanks
>Urban Loesch


More information about the dovecot mailing list