Package: procmail Version: 3.22-16 Severity: grave Justification: causes non-serious data loss
Hi, formail and procmail do not handle mboxes whose endlines are CRLF I'll attach a mbox for demonstration purpose: $ file Sent Sent: ASCII text, with CRLF line terminators $ cat Sent| formail -s cat - | file - /dev/stdin: ASCII mail text, with CRLF, LF line terminators formail has added a '\n' between the headers and the body. With $ cat Sent| formail -s cat - I notice formail has added '>' just before the second From field. But it is not a bogus From field, it's the real From for second mail. Then mailbox is totally corrupted. When I encountered that bug, the real line was: $ cat Sent| formail -s procmail So, even with $ cat Sent| formail -b -s procmail procmail would have added a '>' before the second From field. I did not find a way to prevent that. So, when using formail -s procmail, I do no think of a way to prevent '>' addition. The mbox I attach has been anonymified, but I was created with thunderbird (thunderbird uses CRLF for Sent mailbox) About endlines in mbox, man 5 mbox (from mutt package) tells: > An mbox is a text file containing an arbitrary number of e-mail messages. > Each message consists of a postmark, followed by an e- > mail message formatted according to RFC822, RFC2822. The file format is > line-oriented. Lines are separated by line feed characters > (ASCII 10). but I did not find reference to that rule in other mbox description I found: http://qmail.org/qmail-manual-html/man5/mbox.html By the way, rfc2822 tells: > Messages are divided into lines of characters. A line is a series of > characters that is delimited with the two characters carriage-return > and line-feed; that is, the carriage return (CR) character (ASCII > value 13) followed immediately by the line feed (LF) character (ASCII > value 10). (The carriage-return/line-feed pair is usually written in > this document as "CRLF".) http://www.faqs.org/rfcs/rfc2822.html Anyway, I think procmail should not corrupt mailboxes with CRLF. Don't hesitate to ask for more informations if needed. arno. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.21 Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages procmail depends on: ii libc6 2.6.1-1+b1 GNU C Library: Shared libraries Versions of packages procmail recommends: ii postfix [mail-transport-agent 2.4.5-3 High-performance mail transport ag -- no debconf information
>From - Tue Aug 28 15:32:39 2007 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00800000 Message-ID: <[EMAIL PROTECTED]> Date: Tue, 28 Aug 2007 15:32:38 +0200 From: arno <[EMAIL PROTECTED]> User-Agent: Mozilla-Thunderbird 2.0.0.4 (X11/20070622) MIME-Version: 1.0 To: [EMAIL PROTECTED] Subject: Re: hello Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit test On 01.11.2006 20:10, someone wrote: > > hello > > >From - Tue Aug 28 15:33:34 2007 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00800000 Message-ID: <[EMAIL PROTECTED]> Date: Tue, 28 Aug 2007 15:33:34 +0200 From: arno <[EMAIL PROTECTED]> User-Agent: Mozilla-Thunderbird 2.0.0.4 (X11/20070622) MIME-Version: 1.0 To: [EMAIL PROTECTED] Subject: Re: Des nouvelles Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit second mail