CRLF vs. LF: X-CRM114 header lines on the bottom of message?

Sim <[email protected]> Sat, 19 Nov 2016 18:58:49 +0100
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============2892102764288075027==
Content-Type: multipart/alternative;
	boundary="------------0F6251DD44E3F07F2C1B9B45"

This is a multi-part message in MIME format.
--------------0F6251DD44E3F07F2C1B9B45
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi list,

After a decade, I get to run a mail server again. Back then, I had used
DSPAM. Now, I want to give CRM114 a try. Excuse my newbie question.

I find all the X-CRM114 lines appended to the body of incoming emails.
That cannot be correct, or? Interestingly, it starts working if I remove
the CR from the RFC5322 email:

    $ file /tmp/SomeMail.rfc5322.eml
    /tmp/SomeMail.rfc5322.eml: SMTP mail, ASCII text, with CRLF line
    terminators

    $ wc -l /tmp/SomeMail.rfc5322.eml
    98 /tmp/SomeMail.rfc5322.eml

    $ cat /tmp/SomeMail.rfc5322.eml | ./mailreaver.crm | tail -n 6
    JTJFZGUmbXNnaWQ9JTNDMjAxNjExMTgyMDU3NDklMkVITSUyRTAwMDAwMDAwMDAwMDhqa=
yU0
    MGF2YW5lZ2FzczA0JTJFd3dsMTcyOSUyRWhhbm1haWwlMkVuZXQlM0UiPgo=3D
    X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) )
    MR-27CA1CFB
    X-CRM114-CacheID: sfid-20161119_172554_829178_39744B64
    X-CRM114-Status: UNSURE (   0.00  )
    X-CRM114-Notice: Please train this message.

If I convert it to "unix style" line breaks it appends the X-CRM114
lines to the header. As it should be - I think:

    $ cat /tmp/SomeMail.rfc5322.eml|tr -d '\015'|./mailreaver.crm|grep
    "^$" -B4 -A3
    X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) )
    MR-27CA1CFB
    X-CRM114-CacheID: sfid-20161119_174156_811984_46A16809
    X-CRM114-Status: UNSURE (   0.00  )
    X-CRM114-Notice: Please train this message.

    PGh0bWw+PGhlYWQ+PHN0eWxlPiBwIHttYXJnaW4tdG9wOjBweDttYXJnaW4tYm90dG9tO=
jBw
    eDt9IDwvc3R5bGU+PC9oZWFkPgo8Ym9keT48ZGl2IHN0eWxlPSJmb250LXNpemU6MTJwe=
Dsg
    Zm9udC1mYW1pbHk66rW066a8LOq1tOumvOyytCxHdWxpbSxCYWVrbXVrIERvdHVtLFVuZ=
G90

The mailreaver.crm is the unaltered one that shipped with Ubuntu 14.04.
Is this behavior normal or am I missing something?

Simon


--------------0F6251DD44E3F07F2C1B9B45
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf=
-8">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    Hi list,<br>
    <br>
    After a decade, I get to run a mail server again. Back then, I had
    used DSPAM. Now, I want to give CRM114 a try. Excuse my newbie
    question. <br>
    <br>
    I find all the <tt>X-CRM114</tt> lines appended to the body of
    incoming emails. That cannot be correct, or? Interestingly, it
    starts working if I remove the CR from the RFC5322 email:<br>
    <br>
    <blockquote><tt>$ file /tmp/SomeMail.rfc5322.eml </tt><br>
      <tt>/tmp/SomeMail.rfc5322.eml: SMTP mail, ASCII text, with CRLF
        line terminators</tt><br>
      <br>
      <tt>$ wc -l /tmp/SomeMail.rfc5322.eml</tt><br>
      <tt>98 /tmp/SomeMail.rfc5322.eml</tt><br>
      <br>
      <tt>$ cat /tmp/SomeMail.rfc5322.eml | ./mailreaver.crm | tail -n 6<=
/tt><br>
      <tt>JTJFZGUmbXNnaWQ9JTNDMjAxNjExMTgyMDU3NDklMkVITSUyRTAwMDAwMDAwMDA=
wMDhqayU0</tt><br>
      <tt>MGF2YW5lZ2FzczA0JTJFd3dsMTcyOSUyRWhhbm1haWwlMkVuZXQlM0UiPgo=3D<=
/tt><br>
      <tt>X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) )
        MR-27CA1CFB </tt><br>
      <tt>X-CRM114-CacheID: sfid-20161119_172554_829178_39744B64 </tt><br=
>
      <tt>X-CRM114-Status: UNSURE (=C2=A0=C2=A0 0.00=C2=A0 )</tt><br>
      <tt>X-CRM114-Notice: Please train this message. </tt><br>
    </blockquote>
    If I convert it to "unix style" line breaks it appends the <tt>X-CRM1=
14</tt>
    lines to the header. As it should be - I think:<br>
    <blockquote><tt>$ cat /tmp/</tt><tt><tt>SomeMail</tt>.rfc5322.eml|tr
        -d '\015'|./mailreaver.crm|grep "^$" -B4 -A3</tt><br>
      <tt>X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) )
        MR-27CA1CFB </tt><br>
      <tt>X-CRM114-CacheID: sfid-20161119_174156_811984_46A16809 </tt><br=
>
      <tt>X-CRM114-Status: UNSURE (=C2=A0=C2=A0 0.00=C2=A0 )</tt><br>
      <tt>X-CRM114-Notice: Please train this message. </tt><br>
      <br>
      <tt>PGh0bWw+PGhlYWQ+PHN0eWxlPiBwIHttYXJnaW4tdG9wOjBweDttYXJnaW4tYm9=
0dG9tOjBw</tt><br>
      <tt>eDt9IDwvc3R5bGU+PC9oZWFkPgo8Ym9keT48ZGl2IHN0eWxlPSJmb250LXNpemU=
6MTJweDsg</tt><br>
      <tt>Zm9udC1mYW1pbHk66rW066a8LOq1tOumvOyytCxHdWxpbSxCYWVrbXVrIERvdHV=
tLFVuZG90</tt><br>
    </blockquote>
    The <tt>mailreaver.crm</tt> is the unaltered one that shipped with
    Ubuntu 14.04. Is this behavior normal or am I missing something? <br>
    <br>
    Simon<br>
    <br>
  </body>
</html>

--------------0F6251DD44E3F07F2C1B9B45--


--===============2892102764288075027==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============2892102764288075027==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Crm114-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crm114-general

--===============2892102764288075027==--