RainLoop / rainloop-webmail

Simple, modern & fast web-based email client
http://rainloop.net
MIT License
4.11k stars 892 forks source link

Can't get message list on several pages #494

Closed sharq88 closed 9 years ago

sharq88 commented 9 years ago

Some inbox folders loading properly some gives this error. I tried https://github.com/RainLoop/rainloop-webmail/issues/253 and https://github.com/RainLoop/rainloop-webmail/issues/267 but it's something else. Switched on logs and found this: Any idea?

[17:22:27.110][19d62e53] IMAP[DATA]: < * 423 FETCH (UID 12682 RFC822.SIZE 89848 INTERNALDATE "23-Feb-2015 14:52:46 +0100" FLAGS () BODYSTRUCTURE ((("text" "plain" ("charset" "utf-8") NIL NIL "quoted-printable" 408 37 NIL NIL NIL)("text" "html" ("charset" "utf-8") NIL NIL "quoted-printable" 2105 27 NIL NIL NIL) "alternative" ("boundary" "_=_swift_v4142469955754eb30a5ad9e9=_") NIL NIL)("application" "pdf" ("name" "143481_2015-02-22.pdf") NIL NIL "base64" 84656 NIL ("attachment" ("filename" "1434812015-02-22.pdf")) NIL) "mixed" ("boundary" "=_swift_v4142469955754eb30a5a47c2=_") NIL NIL) BODY[HEADER] {1937}\r\n [17:22:27.111][19d62e53] IMAP[DATA]: < * BYE [ALERT] Fatal error: Invalid argument\r\n [17:22:27.112][19d62e53] IMAP[ERROR]: exception 'MailSo\Net\Exceptions\SocketReadException' with message 'MailSo-Net-Exceptions-SocketReadException (NetClient.php ~ 514)' in /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/MailSo/Net/NetClient.php:514 Stack trace:

0 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/MailSo/Imap/ImapClient.php(1889): MailSo\Net\NetClient->getNextBuffer()

1 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/MailSo/Imap/ImapClient.php(1755): MailSo\Imap\ImapClient->partialParseResponseBranch(Object(MailSo\Imap\Response))

2 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/MailSo/Imap/ImapClient.php(959): MailSo\Imap\ImapClient->parseResponse()

3 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/MailSo/Mail/MailClient.php(1618): MailSo\Imap\ImapClient->Fetch(Array, '12688,12687,126...', true)

4 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/MailSo/Mail/MailClient.php(1964): MailSo\Mail\MailClient->MessageListByRequestIndexOrUids(Object(MailSo\Mail\MessageCollection), Array, true)

5 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/RainLoop/Actions.php(5424): MailSo\Mail\MailClient->MessageList('INBOX', 0, 10, '', '12689', Object(MailSo\Cache\CacheClient), true, false, Array, false)

6 [internal function]: RainLoop\Actions->DoMessageList()

7 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/RainLoop/ServiceActions.php(164): call_user_func(Array)

8 [internal function]: RainLoop\ServiceActions->ServiceAjax()

9 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/RainLoop/Service.php(143): call_user_func(Array)

10 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/RainLoop/Service.php(56): RainLoop\Service->localHandle()

11 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/libraries/RainLoop/Service.php(79): RainLoop\Service->__construct()

12 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/app/handle.php(83): RainLoop\Service::Handle()

13 /var/www/data1/legy.hu/_legy.hu/webmail/rainloop/v/1.8.1.271/include.php(228): include('/var/www/data1/...')

14 /var/www/data1/legy.hu/_legy.hu/webmail/index.php(12): include('/var/www/data1/...')

15 {main}

RainLoop commented 9 years ago

Can you give me a full log of the session?

sharq88 commented 9 years ago

Sure. https://app.box.com/s/fbm3iwcpcvtgozprzzjpupvdumf9rx3i

RainLoop commented 9 years ago
* 423 FETCH (UID 12682 RFC822.SIZE 89848 INTERNALDATE "23-Feb-2015 14:52:46  +0100" FLAGS () BODYSTRUCTURE ((("text" "plain" ("charset" "utf-8") NIL NIL "quoted-printable" 408 37 NIL NIL NIL)("t ext" "html" ("charset" "utf-8") NIL NIL "quoted-printable" 2105 27 NIL NIL NIL) "alternative" ("boundary" "_=_swift_v4 _142469955754eb30a5ad9e9_=_") NIL NIL)("application" "pdf" ("name" "143481_2015-02-22.pdf") NIL NIL "base64" 84656 NIL  ("attachment" ("filename" "143481_2015-02-22.pdf")) NIL) "mixed" ("boundary" "_=_swift_v4_142469955754eb30a5a47c2_=_" ) NIL NIL) BODY[HEADER] {1937}
* BYE [ALERT] Fatal error: Invalid argument

Very strange, I can not understand what was going on. It just says BYE with fatal error.

Perhaps, Internal logs of your mail server will help us.

sharq88 commented 9 years ago

Here you go. I found the email which cause the issue. Import it to your mailbox. https://drive.google.com/file/d/0B9SyNX9i5WcXVnFWQThXUHg1NlU/view?usp=sharing

RainLoop commented 9 years ago

Thanks. But it is a IMAP server problem. For example my mail server works good with your message.

sharq88 commented 9 years ago

I dont think its an imap problem, I rather believe its an encoding issue. See: http://stackoverflow.com/questions/5458439/php-sent-emails-have-0a-0a-instead-of-new-lines

The mailbox opened with roundcube works ok. Anyway.. is there any chance you could put the mail list fetching function into an extra try catch block? So maybe some malformed emails sent to the mailbox doesn't result the rainloop client unusable. As its happend a few times recently, thats why I investigated.

RainLoop commented 9 years ago
* BYE [ALERT] Fatal error: Invalid argument

It breaks an IMAP response. It means that try catch block will not help.

Your mail server does not like RainLoop's IMAP request. RoundCube probably works a bit differently, so it has no porblem.

Can you check IMAP server logs?

sharq88 commented 9 years ago

Thanks for your help. We didn't find anything in the imap log. However I found a few other article related to this problem, which share your opinion, seems like its an IMAP issue.

https://bugs.launchpad.net/ubuntu/+source/courier/+bug/984705 https://bugs.horde.org/ticket/12027 https://lists.debian.org/debian-qt-kde/2011/07/msg00222.html http://www.roundcubeforum.net/index.php?topic=8467.0

RainLoop commented 9 years ago

Thanks, Yes, its very similar to your problem.