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

Simon <[email protected]> Sun, 20 Nov 2016 14:36:22 +0100
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============0371228185348091405==
Content-Type: multipart/alternative;
	boundary="------------AD630E924328F27B6F1528C7"

This is a multi-part message in MIME format.
--------------AD630E924328F27B6F1528C7
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

###
Sorry, if this is a repost for some of you. Sourceforge's mailing list
manager cannot handle DMARC protected domains and my earlier mail
bounced with most recipients (Gmail, Yahoo, Microsoft, etc.). If you see
this message for the first time, you were one of them. Reposting from a
different RFC5322.From domain.
###

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
    JTJFZGUmbXNnaWQ9JTNDMjAxNjExMTgyMDU3NDklMkVITSUyRTAwMDAwMDAwMDAwMDhqayU0
    MGF2YW5lZ2FzczA0JTJFd3dsMTcyOSUyRWhhbm1haWwlMkVuZXQlM0UiPgo=
    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+PHN0eWxlPiBwIHttYXJnaW4tdG9wOjBweDttYXJnaW4tYm90dG9tOjBw
    eDt9IDwvc3R5bGU+PC9oZWFkPgo8Ym9keT48ZGl2IHN0eWxlPSJmb250LXNpemU6MTJweDsg
    Zm9udC1mYW1pbHk66rW066a8LOq1tOumvOyytCxHdWxpbSxCYWVrbXVrIERvdHVtLFVuZG90

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

Simon




--------------AD630E924328F27B6F1528C7
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">
    ###<br>
    Sorry, if this is a repost for some of you. Sourceforge's mailing
    list manager cannot handle DMARC protected domains and my earlier
    mail bounced with most recipients (Gmail, Yahoo, Microsoft, etc.).
    If you see this message for the first time, you were one of them.
    Reposting from a different RFC5322.From domain. <br>
    ###<br>
    <br>
    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>
    <br>
    <br>
  </body>
</html>

--------------AD630E924328F27B6F1528C7--


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

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

--===============0371228185348091405==
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

--===============0371228185348091405==--