rspamd / rspamd

Rapid spam filtering system.
Other
2.06k stars 382 forks source link

Symbols assigned in error #2584

Closed gaaf closed 5 years ago

gaaf commented 6 years ago

Classification (Please choose one option):

Reproducibility (Please choose one option):

Rspamd version:

1.7.9

Operation system, CPU:

Debian sid, amd64

Description (Please provide a descriptive summary of the issue):

rspamd assigns some symbols i would not have expected from the message. This happens on a lot of messages from a specific mailinglist. The messages probably include some syntax that is invalid and/or trips a bug in rspamd (maybe the empty X-Spam-Level: header or the invalid characters in the X-Spam_report header?).

In the example message below, the following symbols seem to be assigned in error: R_MISSING_CHARSET (charset is in the individual parts) BROKEN_CONTENT_TYPE (looks like a valid multipart to me) MISSING_SUBJECT (there is a subject!)

Expected results:

None of the mentioned symbols

Actual results:

Symbol: R_MISSING_CHARSET(2.50) Symbol: BROKEN_CONTENT_TYPE(1.50) Symbol: MISSING_SUBJECT(2.00)

Configuration (e.g. rspamadm configdump module):

Section module NOT FOUND

Additional information:

Example message:

Return-path: <sr-users-bounces@lists.kamailio.org>
Envelope-to: myemail@example.com
Delivery-date: Sat, 06 Oct 2018 02:09:40 +0200
Received: from relay1.transip.nl ([149.210.149.29]:29869)
    by myhost.example with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
    (Exim 4.91)
    (envelope-from <sr-users-bounces@lists.kamailio.org>)
    id 1g8aA7-0007hF-Nr
    for myemail@example.com; Sat, 06 Oct 2018 02:09:39 +0200
Received: from www.kamailio.org (main.kamailio.org [193.22.119.66])
    by relay1.transip.nl (Postfix) with ESMTPS id 42Rmt36crkz14fY
    for <myemail@example.com>; Sat,  6 Oct 2018 01:58:19 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.kamailio.org; s=20151206;
    h=Sender:Content-Type:Reply-To:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:To:In-Reply-To:References:Message-Id:Date:Mime-Version:From; bh=2Q88ipUie9+X1j/6ba6Z2ioxZpHdBOibWRrFBiGShbo=;
    b=kAGsNIw/QHqeCIhaUyStL37HXpy639y5dW3mTUWTE9hcSY201cQtMRH1reZ5elxQZyZDtW22Ui8dJ/kkhGEcJlAoFpqveyj9klZlYxHLFlAvMBcIJTW+kUcIL5BWyaLh3+V3nShAqawgJIJ2tTJ1OGTvVL24utvBkGhTZx1PE8s=;
Received: from localhost
    ([127.0.0.1] helo=main.kamailio.org ident=list)
    by www.kamailio.org with esmtp (Exim 4.84_2)
    (envelope-from <sr-users-bounces@lists.kamailio.org>)
    id 1g8Zys-00059d-Lh; Sat, 06 Oct 2018 01:58:03 +0200
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on www.kamailio.org
X-Spam-Level:
Received: from mi2.lodhosting.com ([208.67.207.12] helo=mi0.lodhosting.com)
 by www.kamailio.org with esmtp (Exim 4.84_2)
 (envelope-from <sender@example.com>) id 1g8Zxg-0004nB-F6
 for sr-users@lists.kamailio.org; Sat, 06 Oct 2018 01:56:50 +0200
Received: from [8.8.8.8] (senderhost.example.com
 [8.8.8.8])
 by senderhost.example.com (Postfix) with ESMTP id A01BF2AE0DC7
 for <sr-users@lists.kamailio.org>; Fri,  5 Oct 2018 16:56:41 -0700 (PDT)
From: Sender <sender@example.com>
Mime-Version: 1.0 (1.0)
Date: Fri, 5 Oct 2018 19:56:40 -0400
Message-Id: <E7015E63-E006-4E30-9313-851CB7F2424E@palner.com>
References: <CAEg+R1jKBwpFZn4ELXFmDcL+Nv1FYeUqaoYaFoF7yf4VALAj0A@mail.gmail.com>
 <20180508231413.GA3988@typhoon>
 <CAEg+R1h4KvPqsVP6oyk7zgVH0qrOvW=GwuFJfhznQz4Em+Tzcw@mail.gmail.com>
 <2f06b045-6273-480d-bccd-ca89e333ece6.maildroid@localhost>
In-Reply-To: <2f06b045-6273-480d-bccd-ca89e333ece6.maildroid@localhost>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org>
X-Mailer: iPhone Mail (16A366)
X-Spam_score: -1.9
X-Spam_score_int: -18
X-Spam_bar: -
X-Spam_report: Spam detection software, running on the system "www.kamailio.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.

 Content preview:  Here’s an old one from 5 years ago. The principles remain
    the same. https://www.fredposner.com/1457/kamailio-behind-nat/ -- fred [...]

 Content analysis details:   (-1.9 points, 5.5 required)

  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
  0.0 HTML_MESSAGE           BODY: HTML included in message
  0.0 MIME_QP_LONG_LINE      RAW: Quoted-printable line longer than 76 chars
Subject: Re: [SR-Users] kamailio + rtpproxy behind NAT
X-BeenThere: sr-users@lists.kamailio.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: "Kamailio \(SER\) - Users Mailing List" <sr-users.lists.kamailio.org>
List-Unsubscribe: <https://lists.kamailio.org/cgi-bin/mailman/options/sr-users>,
 <mailto:sr-users-request@lists.kamailio.org?subject=unsubscribe>
List-Archive: <http://lists.kamailio.org/pipermail/sr-users/>
List-Post: <mailto:sr-users@lists.kamailio.org>
List-Help: <mailto:sr-users-request@lists.kamailio.org?subject=help>
List-Subscribe: <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>,
 <mailto:sr-users-request@lists.kamailio.org?subject=subscribe>
Reply-To: "Kamailio \(SER\) - Users Mailing List" <sr-users@lists.kamailio.org>
Content-Type: multipart/mixed; boundary="===============1364639178=="
Errors-To: sr-users-bounces@lists.kamailio.org
Sender: "sr-users" <sr-users-bounces@lists.kamailio.org>
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam_report: Spam detection software, running on the system "www.kamailio.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.

 Content preview:  Here’s an old one from 5 years ago. The principles remain
    the same. https://www.fredposner.com/1457/kamailio-behind-nat/ -- fred [...]

 Content analysis details:   (-2.9 points, 5.5 required)

  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
  0.0 HTML_MESSAGE           BODY: HTML included in message
  0.0 MIME_QP_LONG_LINE      RAW: Quoted-printable line longer than 76 chars
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
X-Spam-Score: 87
X-Spam-Action: add header
X-Spam-Report: Action: add header
 Symbol: ARC_NA(0.00)
 Symbol: RCVD_COUNT_FIVE(0.00)
 Symbol: GREYLIST(0.00)
 Symbol: FROM_HAS_DN(0.00)
 Symbol: R_DKIM_REJECT(1.00)
 Symbol: R_MISSING_CHARSET(2.50)
 Symbol: MIME_GOOD(-0.10)
 Symbol: MV_CASE(0.50)
 Symbol: BROKEN_CONTENT_TYPE(1.50)
 Symbol: RCPT_COUNT_ONE(0.00)
 Symbol: DMARC_NA(0.00)
 Symbol: TO_DN_ALL(0.00)
 Symbol: DKIM_TRACE(0.00)
 Symbol: MISSING_SUBJECT(2.00)
 Symbol: RCVD_IN_DNSWL_NONE(0.00)
 Symbol: R_SPF_NA(0.00)
 Symbol: FORGED_SENDER(0.30)
 Symbol: RCVD_IN_DNSWL_LOW(0.00)
 Symbol: RCVD_TLS_LAST(0.00)
 Symbol: IP_SCORE(-0.97)
 Symbol: ASN(0.00)
 Symbol: FROM_NEQ_ENVFROM(0.00)
 Symbol: MID_RHS_MATCH_FROM(0.00)
 Symbol: FORGED_RECIPIENTS(2.00)
 Message-ID: E7015E63-E006-4E30-9313-851CB7F2424E@palner.com
X-Spam-Status: Spam

--===============1364639178==
Content-Type: multipart/alternative;
    boundary=Apple-Mail-C9403573-708A-4D69-BF6C-F2730C368461
Content-Transfer-Encoding: 7bit

--Apple-Mail-C9403573-708A-4D69-BF6C-F2730C368461
Content-Type: text/plain;
    charset=utf-8
Content-Transfer-Encoding: quoted-printable

Here=E2=80=99s an old one from 5 years ago. The principles remain the same.=
=20

https://www.fredposner.com/1457/kamailio-behind-nat/

=2D- fred=20

> On Oct 5, 2018, at 19:46, Alex Balashov <abalashov@evaristesys.com> wrote:
>=20
> Tragically not.=20
>=20
> --
> Sent from mobile. Apologies for brevity and errors.=20
>=20
> -----Original Message-----
> From: Bonjour Madame <bonjourmadame30@gmail.com>
> To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org>
> Sent: Fri, 05 Oct 2018 6:02 PM
> Subject: Re: [SR-Users] kamailio + rtpproxy behind NAT
>=20
> Hi Alex,
>=20
> Do you also have a link to a sample configuration file for kamailio +
> rtpproxy behind NAT?
>=20
>=20
> Best regards
>=20
>> On Tuesday, May 8, 2018, Alex Balashov <abalashov@evaristesys.com> wrote:
>>=20
>> Hi Clarence,
>>=20
>> This article may help (in fairness, I wrote it):
>>=20
>> http://blog.csrpswitch.com/server-side-nat-traversal-
>> with-kamailio-the-definitive-guide/
>>=20
>>> On Tue, May 08, 2018 at 11:01:47PM +0000, Bonjour Madame wrote:
>>>=20
>>> Hello,
>>>=20
>>> I have kamailio and rtpproxy running on the same server located behind a
>>> router with NAT just like below.
>>>=20
>>> UA(internet)---public ip---router(NAT)--Kamailio+RTPproxy(private
>>> ip)--UA(private network)
>>>=20
>>> There are several issues like one way audio.
>>>=20
>>> I need users on the internet to communicate with each other, users on t=
he
>>> private network to communicate with each other, and users on the intern=
et
>>> and the private network to communicate with each other.
>>>=20
>>> What is the best approach?
>>>=20
>>> Best regards,
>>> Clarence
>>=20
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>=20
>>=20
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>=20
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>=20
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>=20
>=20
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--Apple-Mail-C9403573-708A-4D69-BF6C-F2730C368461
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 dir=3D"auto">Here=E2=80=99s an old one from 5 years =
ago. The principles remain the same.&nbsp;<div><br></div><div><a href=3D"ht=
tps://www.fredposner.com/1457/kamailio-behind-nat/">https://www.fredposner.=
com/1457/kamailio-behind-nat/</a><br><br><div dir=3D"ltr">-- fred&nbsp;<div=
><br></div></div><div dir=3D"ltr"><br>On Oct 5, 2018, at 19:46, Alex Balash=
ov &lt;<a href=3D"mailto:abalashov@evaristesys.com">abalashov@evaristesys.c=
om</a>&gt; wrote:<br><br></div><blockquote type=3D"cite"><div dir=3D"ltr"><=
span>Tragically not. </span><br><span></span><br><span>--</span><br><span>S=
ent from mobile. Apologies for brevity and errors. </span><br><span></span>=
<br><span>-----Original Message-----</span><br><span>From: Bonjour Madame &=
lt;<a href=3D"mailto:bonjourmadame30@gmail.com">bonjourmadame30@gmail.com</=
a>&gt;</span><br><span>To: "Kamailio (SER) - Users Mailing List" &lt;<a hre=
f=3D"mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>&gt=
;</span><br><span>Sent: Fri, 05 Oct 2018 6:02 PM</span><br><span>Subject: R=
e: [SR-Users] kamailio + rtpproxy behind NAT</span><br><span></span><br><sp=
an>Hi Alex,</span><br><span></span><br><span>Do you also have a link to a s=
ample configuration file for kamailio +</span><br><span>rtpproxy behind NAT=
?</span><br><span></span><br><span></span><br><span>Best regards</span><br>=
<span></span><br><span>On Tuesday, May 8, 2018, Alex Balashov &lt;<a href=
=3D"mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>&gt; wro=
te:</span><br><span></span><br><blockquote type=3D"cite"><span>Hi Clarence,=
</span><br></blockquote><blockquote type=3D"cite"><span></span><br></blockq=
uote><blockquote type=3D"cite"><span>This article may help (in fairness, I =
wrote it):</span><br></blockquote><blockquote type=3D"cite"><span></span><b=
r></blockquote><blockquote type=3D"cite"><span><a href=3D"http://blog.csrps=
witch.com/server-side-nat-traversal-">http://blog.csrpswitch.com/server-sid=
e-nat-traversal-</a></span><br></blockquote><blockquote type=3D"cite"><span=
>with-kamailio-the-definitive-guide/</span><br></blockquote><blockquote typ=
e=3D"cite"><span></span><br></blockquote><blockquote type=3D"cite"><span>On=
 Tue, May 08, 2018 at 11:01:47PM +0000, Bonjour Madame wrote:</span><br></b=
lockquote><blockquote type=3D"cite"><span></span><br></blockquote><blockquo=
te type=3D"cite"><blockquote type=3D"cite"><span>Hello,</span><br></blockqu=
ote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>=
</span><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite"><span>I have kamailio and rtpproxy running on the same server=
 located behind a</span><br></blockquote></blockquote><blockquote type=3D"c=
ite"><blockquote type=3D"cite"><span>router with NAT just like below.</span=
><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote type=
=3D"cite"><span></span><br></blockquote></blockquote><blockquote type=3D"ci=
te"><blockquote type=3D"cite"><span>UA(internet)---public ip---router(NAT)-=
=2DKamailio+RTPproxy(private</span><br></blockquote></blockquote><blockquot=
e type=3D"cite"><blockquote type=3D"cite"><span>ip)--UA(private network)</s=
pan><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote typ=
e=3D"cite"><span></span><br></blockquote></blockquote><blockquote type=3D"c=
ite"><blockquote type=3D"cite"><span>There are several issues like one way =
audio.</span><br></blockquote></blockquote><blockquote type=3D"cite"><block=
quote type=3D"cite"><span></span><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><span>I need users on the internet =
to communicate with each other, users on the</span><br></blockquote></block=
quote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>private net=
work to communicate with each other, and users on the internet</span><br></=
blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"=
><span>and the private network to communicate with each other.</span><br></=
blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"=
><span></span><br></blockquote></blockquote><blockquote type=3D"cite"><bloc=
kquote type=3D"cite"><span>What is the best approach?</span><br></blockquot=
e></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span></=
span><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote ty=
pe=3D"cite"><span>Best regards,</span><br></blockquote></blockquote><blockq=
uote type=3D"cite"><blockquote type=3D"cite"><span>Clarence</span><br></blo=
ckquote></blockquote><blockquote type=3D"cite"><span></span><br></blockquot=
e><blockquote type=3D"cite"><blockquote type=3D"cite"><span>_______________=
________________________________</span><br></blockquote></blockquote><block=
quote type=3D"cite"><blockquote type=3D"cite"><span>Kamailio (SER) - Users =
Mailing List</span><br></blockquote></blockquote><blockquote type=3D"cite">=
<blockquote type=3D"cite"><span><a href=3D"mailto:sr-users@lists.kamailio.o=
rg">sr-users@lists.kamailio.org</a></span><br></blockquote></blockquote><bl=
ockquote type=3D"cite"><blockquote type=3D"cite"><span><a href=3D"https://l=
ists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio=
=2Eorg/cgi-bin/mailman/listinfo/sr-users</a></span><br></blockquote></block=
quote><blockquote type=3D"cite"><span></span><br></blockquote><blockquote t=
ype=3D"cite"><span></span><br></blockquote><blockquote type=3D"cite"><span>=
=2D-</span><br></blockquote><blockquote type=3D"cite"><span>Alex Balashov |=
 Principal | Evariste Systems LLC</span><br></blockquote><blockquote type=
=3D"cite"><span></span><br></blockquote><blockquote type=3D"cite"><span>Tel=
: +1-706-510-6800 / +1-800-250-5920 (toll-free)</span><br></blockquote><blo=
ckquote type=3D"cite"><span>Web: <a href=3D"http://www.evaristesys.com/">ht=
tp://www.evaristesys.com/</a>, <a href=3D"http://www.csrpswitch.com/">http:=
//www.csrpswitch.com/</a></span><br></blockquote><blockquote type=3D"cite">=
<span></span><br></blockquote><blockquote type=3D"cite"><span>_____________=
__________________________________</span><br></blockquote><blockquote type=
=3D"cite"><span>Kamailio (SER) - Users Mailing List</span><br></blockquote>=
<blockquote type=3D"cite"><span><a href=3D"mailto:sr-users@lists.kamailio.o=
rg">sr-users@lists.kamailio.org</a></span><br></blockquote><blockquote type=
=3D"cite"><span><a href=3D"https://lists.kamailio.org/cgi-bin/mailman/listi=
nfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<=
/a></span><br></blockquote><blockquote type=3D"cite"><span></span><br></blo=
ckquote><span></span><br><span>____________________________________________=
___</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span><a =
href=3D"mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>=
</span><br><span><a href=3D"https://lists.kamailio.org/cgi-bin/mailman/list=
info/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users=
</a></span><br></div></blockquote></div></body></html>

--Apple-Mail-C9403573-708A-4D69-BF6C-F2730C368461--

--===============1364639178==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KS2FtYWlsaW8g
KFNFUikgLSBVc2VycyBNYWlsaW5nIExpc3QKc3ItdXNlcnNAbGlzdHMua2FtYWlsaW8ub3JnCmh0
dHBzOi8vbGlzdHMua2FtYWlsaW8ub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9zci11c2Vy
cwo=

--===============1364639178==--
vstakhov commented 6 years ago

This message is badly broken by X-Spam_report header. No way.

vstakhov commented 6 years ago

Just in case of confusion: in a email message everything after double newline character must be treated as body. And there is clearly one in X-Spam_report header. Bad symbols are bad but not critical. Double newline just breaks headers parsing.

gaaf commented 6 years ago

Sorry, my editor removed the trailing whitespace. I edited the report, those double CRLF are now gone.

gaaf commented 5 years ago

Can you please provide a link to the commit/fix instead of just closing the issue?

vstakhov commented 5 years ago

I've provided all information in my comments. Resolution: not a bug, won't fix.

gaaf commented 5 years ago

As I already mentioned directly after your comment, I fixed the erroneous double CRLF invalidating your analysis.

Can you please explain why this is not a bug?

vstakhov commented 5 years ago

I have removed crappy SA headers and here is scan result for your message:

[Metric: default]
Action: no action
Spam: false
Score: 3.19 / 15.00
Symbol: ARC_NA (0.00)
Symbol: ASN (0.00)[asn:20857, ipnet:149.210.128.0/17, country:NL]
Symbol: CTYPE_MIXED_BOGUS (1.00)
Symbol: DATE_IN_PAST (1.00)
Symbol: DKIM_TRACE (0.00)[lists.kamailio.org:-]
Symbol: DMARC_NA (0.00)[example.com]
Symbol: FROM_HAS_DN (0.00)
Symbol: FROM_NEQ_ENVFROM (0.00)[sender@example.com, sr-users-bounces@lists.kamailio.org]
Symbol: HAS_LIST_UNSUB (-0.01)
Symbol: HAS_REPLYTO (0.00)[sr-users@lists.kamailio.org]
Symbol: MAILLIST (-0.20)[mailman]
Symbol: MIME_BASE64_TEXT (0.10)
Symbol: MIME_GOOD (-0.10)[multipart/mixed, multipart/alternative, text/plain]
Symbol: MIME_TRACE (0.00)[0:+, 1:+, 2:+, 4:+]
Symbol: MV_CASE (0.50)
Symbol: RCPT_COUNT_ONE (0.00)[1]
Symbol: RCVD_COUNT_FIVE (0.00)[5]
Symbol: RCVD_IN_DNSWL_LOW (-0.10)[29.149.210.149.list.dnswl.org : 127.0.5.1]
Symbol: RCVD_TLS_LAST (0.00)
Symbol: R_DKIM_REJECT (1.00)[lists.kamailio.org]
Symbol: R_SPF_NA (0.00)
Symbol: TO_DN_ALL (0.00)
Message-ID: E7015E63-E006-4E30-9313-851CB7F2424E@palner.com

What symbols are you interested in?

vstakhov commented 5 years ago

And yes, X-Spam_report headers are totally broken.

gaaf commented 5 years ago

I have removed crappy SA headers and here is scan result for your message:

Thanks for looking into this further.

And yes, X-Spam_report headers are totally broken.

Can you please elaborate a bit on why it is totally broken? Every "continued"-line of that header indents with at least one space character. There are some 8-bit characters in it that might be illegal, but my MTA, MDA and MUA's surely don't have a problem with it. Rspamd is, afaik, the only one failing in the whole chain.

I can try to get the sender to fix the sending side if necessary, but i will at least have to tell them (in detail) what is wrong with the header(s).

gaaf commented 5 years ago

Finally found an validator online: https://www.mimevalidator.net/index.html

That one confirms the header is broken because of 8-bit characters in it. Maybe rspamd can be taught to handle those, like most MTA, MDA and MUA's?

vstakhov commented 5 years ago

Well, you are using obsolete FWS syntax according to RFC2822:

4.2. Obsolete folding white space

   In the obsolete syntax, any amount of folding white space MAY be
   inserted where the obs-FWS rule is allowed.  This creates the
   possibility of having two consecutive "folds" in a line, and
   therefore the possibility that a line which makes up a folded header
   field could be composed entirely of white space.

   obs-FWS         =       1*WSP *(CRLF 1*WSP)
vstakhov commented 5 years ago

In fact, it should be supported. However, I'm not completely sure how. I will check more.

vstakhov commented 5 years ago

8bit elements in headers are not basically permitted but that's not the source of this error.

vstakhov commented 5 years ago

Aha, I've found the relevant trace: https://github.com/rspamd/rspamd/issues/2349