Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed Email kills service #54

Open
vmario89 opened this issue Dec 29, 2019 · 2 comments
Open

Malformed Email kills service #54

vmario89 opened this issue Dec 29, 2019 · 2 comments
Labels

Comments

@vmario89
Copy link

Hi, i checked different email feedings now and one of them killed the bridge because its html is malformed. I think the bridge should handle to overlook html rendering issues to be stable enough

REDACTED-email-bot.sh[8036]: Error sending event { [M_UNKNOWN: 'body' not in content]
REDACTED-email-bot.sh[8036]:   errcode: 'M_UNKNOWN',
REDACTED-email-bot.sh[8036]:   name: 'M_UNKNOWN',
REDACTED-email-bot.sh[8036]:   message: '\'body\' not in content',
REDACTED-email-bot.sh[8036]:   data: { errcode: 'M_UNKNOWN', error: '\'body\' not in content' },
REDACTED-email-bot.sh[8036]:   httpStatus: 400 }
REDACTED-email-bot.sh[8036]: setting pendingEvent status to not_sent in !REDACTED:REDACTED.REDACTED.de
REDACTED-email-bot.sh[8036]: [ERROR] { [M_UNKNOWN: 'body' not in content]
REDACTED-email-bot.sh[8036]:   errcode: 'M_UNKNOWN',
REDACTED-email-bot.sh[8036]:   name: 'M_UNKNOWN',
REDACTED-email-bot.sh[8036]:   message: '\'body\' not in content',
REDACTED-email-bot.sh[8036]:   data: { errcode: 'M_UNKNOWN', error: '\'body\' not in content' },
REDACTED-email-bot.sh[8036]:   httpStatus: 400,
REDACTED-email-bot.sh[8036]:   event:
REDACTED-email-bot.sh[8036]:    REDACTEDEvent {
REDACTED-email-bot.sh[8036]:      event:
REDACTED-email-bot.sh[8036]:       { event_id:
REDACTED-email-bot.sh[8036]:          '~!REDACTED:REDACTED.REDACTED.de:m1577622812018.39',
REDACTED-email-bot.sh[8036]:         user_id: '@REDACTED:REDACTED.REDACTED.de',
REDACTED-email-bot.sh[8036]:         room_id: '!REDACTED:REDACTED.REDACTED.de',
REDACTED-email-bot.sh[8036]:         type: 'm.room.message',
REDACTED-email-bot.sh[8036]:         origin_server_ts: 1577622812018,
REDACTED-email-bot.sh[8036]:         content: [Object] },
REDACTED-email-bot.sh[8036]:      sender:
REDACTED-email-bot.sh[8036]:       RoomMember {
REDACTED-email-bot.sh[8036]:         roomId: '!REDACTED:REDACTED.REDACTED.de',
REDACTED-email-bot.sh[8036]:         userId: '@REDACTED:REDACTED.REDACTED.de',
REDACTED-email-bot.sh[8036]:         typing: false,
REDACTED-email-bot.sh[8036]:         name: 'Email Notifier',
REDACTED-email-bot.sh[8036]:         rawDisplayName: 'Email Notifier',
REDACTED-email-bot.sh[8036]:         powerLevel: 0,
REDACTED-email-bot.sh[8036]:         powerLevelNorm: 0,
REDACTED-email-bot.sh[8036]:         user: null,
REDACTED-email-bot.sh[8036]:         membership: 'join',
REDACTED-email-bot.sh[8036]:         events: [Object],
REDACTED-email-bot.sh[8036]:         _isOutOfBand: false,
REDACTED-email-bot.sh[8036]:         _modified: 1577620157349 },
REDACTED-email-bot.sh[8036]:      target: null,
REDACTED-email-bot.sh[8036]:      status: 'not_sent',
REDACTED-email-bot.sh[8036]:      error: [Circular],
REDACTED-email-bot.sh[8036]:      forwardLooking: true,
REDACTED-email-bot.sh[8036]:      _pushActions: null,
REDACTED-email-bot.sh[8036]:      _replacingEvent: null,
REDACTED-email-bot.sh[8036]:      _clearEvent: {},
REDACTED-email-bot.sh[8036]:      _senderCurve25519Key: null,
REDACTED-email-bot.sh[8036]:      _claimedEd25519Key: null,
REDACTED-email-bot.sh[8036]:      _forwardingCurve25519KeyChain: [],
REDACTED-email-bot.sh[8036]:      _decryptionPromise: null,
REDACTED-email-bot.sh[8036]:      _retryDecryption: false,
REDACTED-email-bot.sh[8036]:      _txnId: 'm1577622812018.39' } }

regards, Mario

@vmario89
Copy link
Author

Hi again. I grabbed some example mail which i redacted the sensible parts.
This is a full example (except the 700 lines of encrypted attachment file) which fails:


Return-Path: <[email protected]>
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	somenode.stratoserver.net
X-Spam-Level: *
X-Spam-Status: No, score=1.5 required=5.0 tests=HTML_MESSAGE,
	MAILING_LIST_MULTI,SPF_HELO_NONE,SUBJ_OBFU_PUNCT_FEW,
	SUBJ_OBFU_PUNCT_MANY,TVD_SPACE_RATIO,URIBL_BLOCKED autolearn=no
	autolearn_force=no version=3.4.2
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: by somenode.stratoserver.net (Postfix, from userid 30)
	id 4976E37B4A565; Tue,  5 Nov 2019 09:26:39 +0100 (CET)
X-Sieve: Pigeonhole Sieve 0.5.7.2 (7372921a)
X-Sieve-Redirected-From: [email protected]
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from pferd.in-berlin.de (pferd.in-berlin.de [192.109.42.122])
	by somenode.stratoserver.net (Postfix) with ESMTP id 646DB37B411AE
	for <[email protected]>; Tue,  5 Nov 2019 09:26:33 +0100 (CET)
Authentication-Results: somenode.stratoserver.net;
	dmarc=none (p=NONE sp=NONE) smtp.from=red-redacted.org header.from=redactedmail3.de;
	dmarc=none (p=NONE sp=NONE) smtp.from=red-redacted.org header.from=redactedmail3.de;
	spf=none (sender IP is 192.109.42.122) [email protected] smtp.helo=pferd.in-berlin.de
Received-SPF: none (somenode.stratoserver.net: no valid SPF record)
Received: from pferd.in-berlin.de (localhost [127.0.0.1])
	by pferd.in-berlin.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id xA58Pe6x005657;
	Tue, 5 Nov 2019 09:25:40 +0100
X-Mailman-Handler: $Id: mm-handler 5100 2002-04-05 19:41:09Z bwarsaw $
Received: from einhorn-in.in-berlin.de (einhorn-in.in-berlin.de
 [192.109.42.16])
 by pferd.in-berlin.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id
 xA58Pdwu005651
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <[email protected]>;
 Tue, 5 Nov 2019 09:25:39 +0100
Received: from 23423423.in-berlin.de (23423423.in-berlin.de [192.109.42.28])
 by einhorn-in.in-berlin.de  with ESMTP id xA58Pd3K024633
 for <[email protected]>; Tue, 5 Nov 2019 09:25:39 +0100
X-Envelope-From: [email protected]
X-Envelope-To: <[email protected]>
Received: from mail.redactedmail.de (mail.redactedmail.de
 [188.174.232.35])
 by 23423423.in-berlin.de  with ESMTP id xA58PawG010392
 for <[email protected]>; Tue, 5 Nov 2019 09:25:37 +0100
Received: from redactedmail3.de (unknown [10.244.12.11])
 by mail.redactedmail.de (Postfix) with ESMTPS id 870F11E6080
 for <[email protected]>; Tue,  5 Nov 2019 09:22:48 +0100 (CET)
Received: from ANS-EXCH-01.redactedmail3.local ([fe80::6467:ec6f:7fa2:b04e]) by
 ANS-EXCH-01.redactedmail3.local ([fe80::6467:ec6f:7fa2:b04e%12]) with mapi id
 14.03.0468.000; Tue, 5 Nov 2019 09:25:35 +0100
From: Tom 5657657657 <[email protected]>
To: "[email protected]" <[email protected]>
Thread-Topic: TheFileName.pdf
Thread-Index: AdWTspix9abwSvXIQN6FTShH4aYBNg==
Date: Tue, 5 Nov 2019 08:25:35 +0000
Message-ID: <945461E1CE94090A.1468ae86-4833-49ca-9566-fde94d4f9720@mail.outlook.com>
Accept-Language: de-DE, en-US
Content-Language: de-DE
Content-Type: multipart/mixed;
 boundary="_004_945461E1CE94090A1468ae864833__redacted__94d4f9720mailout_"
MIME-Version: 1.0
Subject: [alle@someEntitity] TheFileName.pdf
X-BeenThere: [email protected]
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Diskussions- und Informationsliste ALLER registrierten Nutzer der
 Plattform www.red-redacted.org" <alle-red-redacted.org>
List-Unsubscribe: <https://mailman.red-redacted.org/mailman/options/alle-red-redacted.org>,
 <mailto:[email protected]?subject=unsubscribe>
List-Archive: <https://mailman.red-redacted.org/mailman/private/alle-red-redacted.org/>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[email protected]?subject=help>
List-Subscribe: <https://mailman.red-redacted.org/mailman/listinfo/alle-red-redacted.org>,
 <mailto:[email protected]?subject=subscribe>
Errors-To: [email protected]
Sender: "alle" <[email protected]>

--_004_945461E1CE94090A1468ae864833__redacted__94d4f9720mailout_
Content-Type: multipart/alternative;
	boundary="_000_945461E1CE94090A1468ae86483349ca9566fde94d4f9720mailout_"

--_000_945461E1CE94090A1468ae86483349ca9566fde94d4f9720mailout_
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

QmVybGluL0NpdHlMYWIuLi4uDQoNCnZvbiB1bnRlcndlZ3MuLi4NCg==

--_000_945461E1CE94090A1468ae86483349ca9566fde94d4f9720mailout_
Content-Type: text/html; charset="utf-8"
Content-ID: <[email protected]>
Content-Transfer-Encoding: base64

PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i
dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4NCjwvaGVhZD4NCjxib2R5Pg0KPGRpdiBzdHlsZT0i
Y29sb3I6IHJnYigzMywgMzMsIDMzKTsgYmFja2dyb3VuZC1jb2xvcjogcmdiKDI1NSwgMjU1LCAy
NTUpOyB0ZXh0LWFsaWduOiBsZWZ0OyIgZGlyPSJhdXRvIj4NCkJlcmxpbi9DaXR5TGFiLi4uLjwv
ZGl2Pg0KPGRpdiBpZD0ibXMtb3V0bG9vay1tb2JpbGUtc2lnbmF0dXJlIj4NCjxkaXY+PGJyPg0K
PC9kaXY+DQp2b24gdW50ZXJ3ZWdzLi4uPC9kaXY+DQo8L2JvZHk+DQo8L2h0bWw+DQo=

--_000_945461E1CE94090A1468ae86483349ca9566fde94d4f9720mailout_--

--_004_945461E1CE94090A1468ae864833__redacted__94d4f9720mailout_
Content-Type: application/pdf;
	name="TheFileName.pdf"
Content-Description: TheFileName.pdf
Content-Disposition: attachment;
	filename="TheFileName.pdf"; size=52438;
	creation-date="Tue, 05 Nov 2019 08:25:35 GMT";
	modification-date="Tue, 05 Nov 2019 08:25:35 GMT"
Content-ID: <[email protected]>
Content-Transfer-Encoding: base64

JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRmlsdGVyIC9G
|||ENCRYPTED_ATTACHMENT_STUFF|||
QwCiUlRU9GCg==

--_004_945461E1CE94090A1468ae864833__redacted__94d4f9720mailout_
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

-- =

alle mailing list
[email protected]
https://mailman.red-redacted.org/mailman/listinfo/alle-red-redac=
ted.org

--_004_945461E1CE94090A1468ae864833__redacted__94d4f9720mailout_--

@vmario89
Copy link
Author

maybe it has to do with base64 encoding of the body content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants