After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766552 - Outlook.com incorrectly returning "BAD" response
Outlook.com incorrectly returning "BAD" response
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: accounts
0.11.x
Other Linux
: Normal critical
: 0.11.1
Assigned To: Michael Gratton
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-17 08:52 UTC by acutbal
Modified: 2016-06-08 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (35.16 KB, image/png)
2016-05-17 08:52 UTC, acutbal
  Details
Logcat (7.20 KB, text/plain)
2016-05-17 14:50 UTC, acutbal
  Details
Logcat (41.79 KB, text/plain)
2016-05-17 15:05 UTC, acutbal
  Details
Logcat (123.46 KB, text/plain)
2016-05-18 08:50 UTC, acutbal
  Details
logcat (126.20 KB, text/plain)
2016-05-18 09:03 UTC, acutbal
  Details
Log (76.07 KB, text/plain)
2016-06-05 17:35 UTC, acutbal
  Details
Patch that might fix the problem (5.46 KB, patch)
2016-06-07 14:27 UTC, Michael Gratton
none Details | Review

Description acutbal 2016-05-17 08:52:06 UTC
Created attachment 328044 [details]
Screenshot

Hello!!

I'm running Ubuntu Mate 16.04, installed Geary 0.10 from Ubuntu's repo and after Geary 0.11 from the ppa. Always have the same issue, Geary doesn't show the inbox of one of my Outlook.com accounts. The same happens with 0.10 and 0.11.

I've tried to sign in choosing "Outlook.com" and "Others" and setting Outlook as a IMAP service, deleted the account several times, restarted the laptop, but anything has fixed the issue.

Thank you very much and best regards!!
Comment 1 Michael Gratton 2016-05-17 14:38:36 UTC
Hi, thanks for reporting this issue.

To be able to look into the problem, we'll need some debugging information. Can you please try the following:

1. Start geary using the following command: geary -d | tee geary.out
2. Add the account as an Outlook.com account
3. When the new inbox fails to appear, wait for a short while and then quit Geary
4. Open the newly created file geary.out in a text editor, and find/replace any personal information in that file
5. Attach the updated geary.out file to this bug for analysis
Comment 2 acutbal 2016-05-17 14:50:55 UTC
Created attachment 328085 [details]
Logcat
Comment 3 acutbal 2016-05-17 14:52:31 UTC
Hi!!

I've done what you suggested, I hope I've done it right. If not, please let me know.

Thank you very much for your quick reponse and best regards!! :)
Comment 4 acutbal 2016-05-17 14:55:31 UTC
Ups!! I think I've attached the wrong logcat... :(

How could I delete and submit the correct?

Sorry... I apologize...
Comment 5 acutbal 2016-05-17 15:05:27 UTC
Created attachment 328087 [details]
Logcat

This one is the correct logcat.

I apologize for the incovenience...
Comment 6 Michael Gratton 2016-05-18 04:57:55 UTC
(In reply to acutbal from comment #5)
> Created attachment 328087 [details]
> Logcat
> 
> This one is the correct logcat.
> 
> I apologize for the incovenience...

No problem at all, thanks for the log file. This is the error that is occurring:

> Error al recibir los datos: Conexión reinicializada por la máquina remota

I.e. outlook.com is unexpectedly closing the connection.

Can I get you to do two more things: Attach another log file again, but use this command to instead: "geary -d --log-network | tee geary.out" - this will generate a much bigger file, but it might have some more information about the error.

Also, if you go into the Options for your account on outlook.com in your browser, (usually up the top of the page, maybe under the gear icon) and select About, what does it say for "External IMAP setting" and "External SMTP setting"?
Comment 7 acutbal 2016-05-18 08:50:15 UTC
Created attachment 328120 [details]
Logcat

Hi,

I've attached a new logcat using the command that you proposed but doing all the steps that you suggested in #comment 1.

Kind regards!! :)
Comment 8 acutbal 2016-05-18 09:03:37 UTC
Created attachment 328123 [details]
logcat

Hi!!

I've attached a new second logcat, this time using the command that you suggested in comment 6, but with the problematic outlook.com account already added.

I've also searched for the "About" in Outlook.com but I could not find the option. However, I've tried to set up this account using this parameters but fails to connect to my inbox:

http://windows.microsoft.com/en-US/windows/outlook/send-receive-from-app

They are the same settings used by Thunderbird. I've done another test: I've deleted this account from Thunderbird and added again, worked perfect, I can see my inbox. So, for whatever misterious reason outlook.com servers refuses the conection for this account.

Many thanks for your help and best regards!!
Comment 9 acutbal 2016-05-19 08:02:07 UTC
Yesterday night I've done some test: 

- I tried to add the same Outlook.com account but this time with the laptop connected to the 4G data connection of my phone, couldn't see the inbox.
- I tried to add the same Outlook.com account from my PC's home, and the result was the same, I couldn't get my inbox.

Best regards!!
Comment 10 acutbal 2016-06-02 16:37:28 UTC
I think I'm not the only one who has problems with Outlook.com:

http://elementaryos.stackexchange.com/questions/5597/geary-cant-access-my-outlook-de-account-connection-error

Best regards!! :)
Comment 11 Michael Gratton 2016-06-03 03:59:05 UTC
Thanks for the exta info, I'll be looking into this ASAP!
Comment 12 acutbal 2016-06-03 08:10:16 UTC
Hi!!

Thank you very much for your interest, I really appreciate!! :)

Now I'm using Thunderbird, but with five accounts and a calendar synced it uses 250mb (or more) of RAM. Too much for my laptop...


Very best regards and many thanks again!! :D
Comment 13 Michael Gratton 2016-06-05 07:15:27 UTC
Hey there, I just spent some time looking over the log files and trying to reproduce the problem with a test outlook.com account, but couldn't see where it's going wrong.

Can you please produce one more log file as follows:

1. Remove the working account, either via the accounts dialog or by moving its directory out of ~/.local/share/geary, so only the account causing the problem is present

2. Run Geary with the following:

> LANGUAGE=en geary -d --log-network --log-serializer --log-deserializer | tee geary.out

3. Replace your email, login and password from that file with some text (the extra options will cause the login and password to be output, so do make sure you find/replace them) and attach it here.

Thanks for your assistance!
Comment 14 acutbal 2016-06-05 17:35:38 UTC
Created attachment 329158 [details]
Log

Hi, I've attached the new log resulted from the command line that you suggested.

Thank you very much and very best regards!! :)
Comment 15 Michael Gratton 2016-06-07 12:21:51 UTC
Okay, so it looks like outlook.com's Exchange servers are themselves suffering some kind of internal bug consistently when it gets to a specific nth command that Geary is sending for that account.

Examples include, when responding to numerous pipelined STATUS commands:

> SOMETAG BAD Required space character missing.
> SOMETAG BAD Bad command.

Where "SOMETAG" is some fragment of the current or a previously tagged command sent to the server. In both these cases, while the order of the folders being STATUS'ed was different, the command tagged "a058" triggered the bug, which was something like the 54th STATUS command sent to the server.

I don't think either of the commands tagged a058 were in fact bad commands, and there's at least one other example of this occurring with a different IMAP client, so this does indeed seem like an Exchange bug.

Since according to the RFC at least STATUS commands are expensive, maybe we're overflowing Exchange's command buffer or something while it's processing them all.

I'll see if I can come up with a patch to limit the number of pipelined STATUS commands we send. Stay tuned!
Comment 16 acutbal 2016-06-07 12:35:24 UTC
Thank you very much for your detailed explanation, I really appreciate your interest!!

I'll wait for news, I hope you can fix so Geary can become my default email client.


Again, thank you very much and very best regards!! :D
Comment 17 Michael Gratton 2016-06-07 14:27:58 UTC
Created attachment 329279 [details] [review]
Patch that might fix the problem

Patch limits max number of pipelined commands sent to outlook.com to 25 per batch.

Can you please try building Geary from source, with this patch applied, and let me know if this workaround fixes this bug for you? Thanks!
Comment 18 acutbal 2016-06-07 14:33:56 UTC
I'm terribly sorry... I don't know how to do such thing, I'm just a regular user...
 
I wonder if you could explain me how to do this... I'm running Ubuntu Mate 16.04. A place with the instructions and the site for download the sources could also be useful.


Many thanks and sorry...
Comment 19 acutbal 2016-06-07 14:38:18 UTC
I can find the source here, right?

https://download.gnome.org/sources/geary/

https://git.gnome.org/browse/geary/


Thank you very much!!
Comment 20 Michael Gratton 2016-06-07 14:49:52 UTC
No problem, try the following:

1. Download the 0.11 tarball from here: https://download.gnome.org/sources/geary/0.11/geary-0.11.0.tar.xz
2. Expand the tarball into your home directory, preserving its directory structure
3. Save the patch to the "geary-0.11.0" directory: https://bug766552.bugzilla-attachments.gnome.org/attachment.cgi?id=329279
4. Open a terminal window and type in the following commands, one after the other:

> cd ~/geary-0.11.0
> sudo apt-get build-dep geary
> patch -p1 < 0001-Limit-the-number-of-pipelined-STATUS-commands-sent-to-outloookcom.patch
> ./configure
> make

If that all works, you'll have a patched version of geary. If Geary is running, make sure you quit it first, wait 10 seconds, the run the patched version using the command:

> ./geary -d

Let me know how that all goes.
Comment 21 Michael Gratton 2016-06-07 14:50:50 UTC
(Well, you can copy and paste the commands, you don't need to type them in manually)
Comment 22 acutbal 2016-06-07 15:06:02 UTC
I'm not sure if I'm doing well, it fails to build:

http://paste.ubuntu.com/17090316/

Regards!! (And thanks for the patience... :D)
Comment 23 acutbal 2016-06-07 15:36:27 UTC
Ok, after installing cmake and enabling source code in my source list I've installed all the dependencies of Geary.

But now I'm stuck with the third command:

albert@HPG62:~/geary-0.11.0$ patch -p1 < 0001-Limit-the-number-of-pipelined-STATUS-commands-sent-to-outloookcom.patch
bash: 0001-Limit-the-number-of-pipelined-STATUS-commands-sent-to-outloookcom.patch: No existe el archivo o el directorio

What should I do now?
Comment 24 acutbal 2016-06-07 15:52:32 UTC
Yes!! It worked!! Finally, reading and following carefully your instructions I've build Geary from source... And voilà!! My inbox from the rebel Outlook accounts appears.

So, your patch work flawlessly.


Thank you very much!!!
Comment 25 Michael Gratton 2016-06-08 06:55:40 UTC
Glad to hear! This fix will be in released in Geary 0.11.1 which is due to be released soon, so you shoudn't have to use the compiled version for too long.
Comment 26 Michael Gratton 2016-06-08 06:56:19 UTC
Pushed to master as 314270a and geary-0.11 as 6a64cf9.
Comment 27 acutbal 2016-06-08 08:03:12 UTC
Thank you very much, I really appreciate your help and interest!!

Just one more thing... How could I remove all the stuff installed to build Geary? Perhaps this command should work?:

sudo apt-get remove build-dep geary


Best regards!! :D
Comment 28 Michael Gratton 2016-06-08 14:51:44 UTC
(In reply to acutbal from comment #27)
> Just one more thing... How could I remove all the stuff installed to build
> Geary?

You can find the names of all the packages Geary depends on for building on lines 6 to 24 of this file: https://git.gnome.org/browse/geary/tree/debian/control?h=geary-0.11

I don't know if you want to remove all of them, but if you `apt-get remove` those you don't want to keep, then do an `apt-get autoremove`, that should clean up any dependencies that are no longer needed.
Comment 29 acutbal 2016-06-08 14:54:34 UTC
Ok, this is what I will do.

Thank you very much for all and very best regards!! :D


PD: Now I'm a happy Geary user...