Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Direct Reply emails over IMAP or POP3 not being added to chat, but are being deleted on access

Open HammyHavoc opened this issue 8 years ago • 6 comments

Description:

Email replies via Direct Reply to emails don't appear to be getting parsed. Emails are sent out via SMTP on the same G Suite account.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.60.2
  • Operating System: Ubuntu
  • Deployment Method(snap/docker/tar/etc): snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • Node Version: v8.8.1

Steps to Reproduce:

  1. Send email to user offline
  2. Receive email
  3. Reply to it (states direct reply is enabled in footer of the email)
  4. Check receiving IMAP address and see emails
  5. Wait
  6. Emails still there and not added into RocketChat.

Expected behavior:

RocketChat to add the emails into the chat thread.

Actual behavior:

They don't get added.

Relevant logs:

I20180102-03:40:42.241(0) <= 'A1 OK [email protected] authenticated (Success)' I20180102-03:40:42.241(0) => 'A2 NAMESPACE' I20180102-03:40:42.365(0) <= '* NAMESPACE (("" "/")) NIL NIL' I20180102-03:40:42.365(0) <= 'A2 OK Success' I20180102-03:40:42.366(0) => 'A3 LIST "" ""' I20180102-03:40:42.487(0) <= '* LIST (\Noselect) "/" "/"' I20180102-03:40:42.488(0) <= 'A3 OK Success' I20180102-03:40:42.489(0) => 'A4 SELECT "INBOX" (CONDSTORE)' I20180102-03:40:42.629(0) <= '* FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing)' I20180102-03:40:42.630(0) <= '* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing \)] Flags permitted.' I20180102-03:40:42.633(0) <= ' OK [UIDVALIDITY 1] UIDs valid.' I20180102-03:40:42.638(0) <= '* 2 EXISTS' I20180102-03:40:42.638(0) <= '* 0 RECENT' I20180102-03:40:42.639(0) <= '* OK [UIDNEXT 16] Predicted next UID.' I20180102-03:40:42.640(0) <= '* OK [HIGHESTMODSEQ 20177]' I20180102-03:40:42.640(0) <= 'A4 OK [READ-WRITE] INBOX selected. (Success)' I20180102-03:40:42.641(0) => 'A5 UID SEARCH UNSEEN' I20180102-03:40:42.772(0) <= '* SEARCH 14 15' I20180102-03:40:42.773(0) <= 'A5 OK SEARCH completed (Success)' I20180102-03:40:42.774(0) => 'A6 UID FETCH 14,15 (X-GM-THRID X-GM-MSGID X-GM-LABELS MODSEQ UID FLAGS INTERNALDATE BODYSTRUCTURE BODY[HEADER.FIELDS (FROM TO DATE MESSAGE-ID)] BODY[1])' I20180102-03:40:42.972(0) <= '* 1 FETCH (X-GM-THRID 1588449156052509842 X-GM-MSGID 1588449184524534086 X-GM-LABELS ("\\Important") UID 14 MODSEQ (19784) INTERNALDATE "02-Jan-2018 03:19:50 +0000" FLAGS (\Seen) BODY[HEADER.FIELDS (FROM TO DATE MESSAGE-ID)] {203}' I20180102-03:40:42.973(0) <= '* 1 FETCH (X-GM-THRID 1588449156052509842 X-GM-MSGID 1588449184524534086 X-GM-LABELS ("\\Important") UID 14 MODSEQ (19784) INTERNALDATE "02-Jan-2018 03:19:50 +0000" FLAGS (\Seen) BODY[1] {591}' I20180102-03:40:42.974(0) <= '* 1 FETCH (X-GM-THRID 1588449156052509842 X-GM-MSGID 1588449184524534086 X-GM-LABELS ("\\Important") UID 14 MODSEQ (19784) INTERNALDATE "02-Jan-2018 03:19:50 +0000" FLAGS (\Seen) BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "utf-8") NIL NIL "QUOTED-PRINTABLE" 591 17 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "utf-8") NIL NIL "QUOTED-PRINTABLE" 3517 45 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "----=_NextPart_48822223.975199258791") NIL NIL))' I20180102-03:40:42.974(0) <= '* 2 FETCH (X-GM-THRID 1588449172106338007 X-GM-MSGID 1588449587002932893 X-GM-LABELS ("\\Important") UID 15 MODSEQ (19887) INTERNALDATE "02-Jan-2018 03:26:14 +0000" FLAGS (\Seen) BODY[HEADER.FIELDS (FROM TO DATE MESSAGE-ID)] {203}' I20180102-03:40:42.974(0) <= '* 2 FETCH (X-GM-THRID 1588449172106338007 X-GM-MSGID 1588449587002932893 X-GM-LABELS ("\\Important") UID 15 MODSEQ (19887) INTERNALDATE "02-Jan-2018 03:26:14 +0000" FLAGS (\Seen) BODY[1] {762}' I20180102-03:40:42.975(0) <= '* 2 FETCH (X-GM-THRID 1588449172106338007 X-GM-MSGID 1588449587002932893 X-GM-LABELS ("\\Important") UID 15 MODSEQ (19887) INTERNALDATE "02-Jan-2018 03:26:14 +0000" FLAGS (\Seen) BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "utf-8") NIL NIL "QUOTED-PRINTABLE" 762 19 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "utf-8") NIL NIL "QUOTED-PRINTABLE" 3688 47 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "----=_NextPart_40387834.522793254357") NIL NIL))' I20180102-03:40:43.228(0) <= '* 1 FETCH (UID 14 MODSEQ (20180) FLAGS (\Seen))' I20180102-03:40:43.228(0) <= '* 2 FETCH (UID 15 MODSEQ (20182) FLAGS (\Seen))' I20180102-03:40:43.229(0) <= 'A6 OK Success' I20180102-03:40:43.229(0) => 'A7 STORE 1 +FLAGS.SILENT (\Deleted)' I20180102-03:40:43.490(0) <= 'A7 OK Success' I20180102-03:40:43.490(0) => 'A8 STORE 2 +FLAGS.SILENT (\Deleted)' I20180102-03:40:43.769(0) <= 'A8 OK Success' I20180102-03:40:43.770(0) => 'IDLE IDLE' I20180102-03:40:43.935(0) <= '+ idling' I20180102-03:40:43.936(0) <= '* 1 EXPUNGE' I20180102-03:40:43.937(0) <= '* 1 EXPUNGE' I20180102-03:40:43.937(0) <= '* 0 EXISTS' I20180102-03:44:44.734(0) Starting Email Intercepter... I20180102-03:44:44.735(0) => DONE I20180102-03:44:44.856(0) <= 'IDLE OK IDLE terminated (Success)' I20180102-03:44:44.857(0) => 'A9 LOGOUT' I20180102-03:44:44.978(0) <= '* BYE LOGOUT Requested' I20180102-03:44:44.979(0) <= 'A9 OK 73 good day (Success)' I20180102-03:44:44.980(0) [connection] Ended I20180102-03:44:44.981(0) [connection] Closed

HammyHavoc avatar Jan 02 '18 03:01 HammyHavoc

Enabling debug for it seemed to immediately delete the messages from the IMAP inbox (parsed), though they weren't added to RC conversations.

HammyHavoc avatar Jan 02 '18 03:01 HammyHavoc

Does it display blank message or nothing at all in RC conversation?

pkgodara avatar Mar 10 '18 04:03 pkgodara

Nothing happens; though emails are correctly sent when users are offline. Can't see it being a configuration issue as have entered the settings many times with the same result, yet this works just fine with other software we're using IMAP and SMTP with.

HammyHavoc avatar Mar 10 '18 16:03 HammyHavoc

@pkgodara Just a follow-up to this: I've now enabled Gmail's POP option instead of IMAP. Same issue. I've set the email to be automatically deleted when they are accessed via POP as per the documentation, though these messages are not added to the chat. Not sure why that is. Any ideas?

HammyHavoc avatar Apr 05 '18 07:04 HammyHavoc

This is one of the errors I'm seeing: I20180405-07:49:04.803(0) Exception in callback of async function: TypeError: Cannot read property 'text' of undefined at POP3Intercepter.initialProcess (/snap/rocketchat-server/1246/programs/server/packages/rocketchat_lib.js:2688:25) at Meteor.bindEnvironment (/snap/rocketchat-server/1246/programs/server/packages/rocketchat_lib.js:2652:16) at runWithEnvironment (packages/meteor.js:1238:24)

HammyHavoc avatar Apr 05 '18 08:04 HammyHavoc

any news to this issue? i have exaktly the same problem

q16marvin avatar Dec 01 '20 21:12 q16marvin