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

Post ID parse error in MIME mail #20

Open
jprusch opened this issue May 7, 2020 · 1 comment
Open

Post ID parse error in MIME mail #20

jprusch opened this issue May 7, 2020 · 1 comment
Labels
Type/Bug Something isn't working

Comments

@jprusch
Copy link

jprusch commented May 7, 2020

Hi,
the plugin now connects to the IMAPS server & pulls the emails send to the reply-to address:

"IMAPD"	2176	1211247	"2020-05-07 13:11:31.153"	"192.168.2.88"	"SENT: * OK IMAPrev1"
"IMAPD"	2180	1211247	"2020-05-07 13:11:31.200"	"192.168.2.88"	"RECEIVED: WYGcsA CAPABILITY"
"IMAPD"	2180	1211247	"2020-05-07 13:11:31.200"	"192.168.2.88"	"SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk[nl]WYGcsA OK CAPABILITY completed"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.200"	"192.168.2.88"	"RECEIVED: cJXhNQ LOGIN "mmreply@OURDOMAIN" ***"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.200"	"192.168.2.88"	"SENT: cJXhNQ OK LOGIN completed"
"IMAPD"	2216	1211247	"2020-05-07 13:11:31.200"	"192.168.2.88"	"RECEIVED: hYx1Kg SELECT INBOX"
"IMAPD"	2216	1211247	"2020-05-07 13:11:31.200"	"192.168.2.88"	"SENT: * 1 EXISTS[nl]* 0 RECENT[nl]* FLAGS (\Deleted \Seen \Draft \Answered \Flagged)[nl]* OK [UIDVALIDITY 1588169699] current uidvalidity[nl]* OK [UIDNEXT 3] next uid[nl]* OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited[nl]hYx1Kg OK [READ-WRITE] SELECT completed"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.215"	"192.168.2.88"	"RECEIVED: nC7ReQ FETCH 1 (BODY[] ENVELOPE)"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.215"	"192.168.2.88"	"SENT: * 1 FETCH (ENVELOPE ("Thu, 7 May 2020 11:03:32 +0000" "=?iso-8859-1?Q?Re=3A_=5BSch=E4ferbarthold_MM=5D_Neue_Direkt?= =?iso-8859-1?Q?nachricht_von_=40admin_am_7=2EMai=2E2020?=" (("=?iso-8859-1?Q?Rusch_Jan-Peter_=7C_Sch=E4ferbarthold_GmbH?=" NIL "j.rusch" "schaeferbarthold.de")) (("=?iso-8859-1?Q?Rusch_Jan-Peter_=7C_Sch=E4ferbarthold_GmbH?=" NIL "j.rusch" "schaeferbarthold.de")) (("=?iso-8859-1?Q?Rusch_Jan-Peter_=7C_Sch=E4ferbarthold_GmbH?=" NIL "j.rusch" "schaeferbarthold.de")) (("[email protected]" NIL "mmreply" "jira.schaeferbarthold.de")) NIL NIL NIL "<DIIE.0000BE320122E144@OURMAILEXCHANGER>") BODY[] {10324}"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.215"	"192.168.2.88"	"SENT: )"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.215"	"192.168.2.88"	"SENT: nC7ReQ OK FETCH completed"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.215"	"192.168.2.88"	"RECEIVED: XpXPyw STORE 1 +FLAGS.SILENT (\Deleted)"
"IMAPD"	2184	1211247	"2020-05-07 13:11:31.215"	"192.168.2.88"	"SENT: XpXPyw OK STORE completed"
"IMAPD"	2216	1211247	"2020-05-07 13:11:31.262"	"192.168.2.88"	"RECEIVED: AXKwJg LOGOUT"

The mail body is then parsed, but this fails with:

2020-05-07T13:06:20.979+0200    error   mlog/sugar.go:23        post id parse error in email <[email protected]>: failed to find postID in email body: This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

I included the email base64 encoded body in the attached file:
mailermost_parse_error.txt

The first part of the mime message is actually the answer of the received mail, which is encoded in the second part of the mime message.

Is this an error on my side or is the plugin not able to identify the post id in the second mime part?

Best
JP

@jprusch
Copy link
Author

jprusch commented May 7, 2020

Some more information:
I found this string in the decoded second part:

https://OURMMSERVER/landing#/it/pl/i31rrnsiztdtxgeq1d3ieokopw

Is this the post id the plugin is searching for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants