Author Topic: [SOLVED] Malformed email results in Connection Error?  (Read 1453 times)

Offline pboehmer

  • Newbie
  • *
  • Posts: 4
[SOLVED] Malformed email results in Connection Error?
« on: December 15, 2017, 12:17:00 PM »
I have a RC 1.3.3 install that serves several hundred customers.  We received a call yesterday that one customer was getting a "Connection Error (Failed to reach the server)!" error when checking their email.  No other reports of issues.  We successfully log into RC using the customer credentials and sure enough, inbox shows 40+ messages in the folder window, but nothing displayed in the message list window and immediately get the connection error.

Eventually, we figured out the issue was caused by a couple of emails in the user's account.  All of the problematic emails in this specific users account had subject lines with "=?UTF-8?Q?" or "=?UTF-32?B?" and had <style> sections containing garbage (Mailsploit?).  Deleting said emails results in a working account, no connection error and message list shows the correct information.  Copying a problematic email to one of our test accounts results in the same error. 

I have debug level set to 8, but there is nothing relevant being outputted to the log file. 

Is the connection error some kind of "fall through" error message that RC uses when no other errors are relevant?  Second, is there anything we can do from the RC side of things to prevent the error (don't display message/ignore UTF encoding?). 

I have attached one of the sanitized (server/account info altered) emails if someone wants to take a look.  We tried altering the subject line.  The only way we could get RC to work with the email was to alter the subject line *AND* remove the <style> section in the message body.
« Last Edit: December 27, 2017, 12:10:52 PM by pboehmer »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,405
    • http://SKaero.com/
Re: Malformed email results in Connection Error?
« Reply #1 on: December 15, 2017, 12:31:18 PM »
What version of Roundcube are you running?

Offline pboehmer

  • Newbie
  • *
  • Posts: 4
Re: Malformed email results in Connection Error?
« Reply #2 on: December 15, 2017, 04:15:10 PM »
Stated above, 1.3.3

Offline pboehmer

  • Newbie
  • *
  • Posts: 4
Re: Malformed email results in Connection Error?
« Reply #3 on: December 22, 2017, 11:11:56 AM »
Since it's just affecting a single customer at this point, we just created a procmail recipe to moved emails with UTF in the Subject line to a separate folder.  Not a fix, but a least the customer can view their mail.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,112
Re: Malformed email results in Connection Error?
« Reply #4 on: December 22, 2017, 02:19:19 PM »
BTW, there's no debug_level=8, just set it to 1.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,112
Re: Malformed email results in Connection Error?
« Reply #5 on: December 22, 2017, 02:25:20 PM »
The test message works for me on PHP 7.2. I saw https://github.com/roundcube/roundcubemail/issues/6093, is this you? Looks like PHP bug.

Offline pboehmer

  • Newbie
  • *
  • Posts: 4
Re: Malformed email results in Connection Error?
« Reply #6 on: December 27, 2017, 11:39:00 AM »
I didn't post the bug report, but this that is my issue.  Thank you very much alec!