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 789271 - Errors connecting to imap.univ-lyon2.fr / ContactOffice IMAP server
Errors connecting to imap.univ-lyon2.fr / ContactOffice IMAP server
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: engine
0.12.x
Other Linux
: Normal major
: 0.14.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-20 21:34 UTC by jerome.alv
Modified: 2019-02-21 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log (161.14 KB, text/x-log)
2017-10-20 21:34 UTC, jerome.alv
  Details
New log on version 12.0 (124.07 KB, text/x-log)
2017-10-23 00:22 UTC, jerome.alv
  Details
geary.out (18.02 KB, text/plain)
2017-10-23 08:18 UTC, jerome.alv
  Details
Always quote mailbox names (873 bytes, patch)
2017-10-24 05:00 UTC, Michael Gratton
none Details | Review
Upper-case the status command literal sent to the server. (879 bytes, patch)
2017-10-24 05:01 UTC, Michael Gratton
none Details | Review
Upper-case the status data type literals sent to the server. (1.34 KB, patch)
2017-10-24 05:02 UTC, Michael Gratton
none Details | Review
my new log (205.71 KB, text/plain)
2017-10-24 12:54 UTC, jerome.alv
  Details
Work around servers that send 0 as UIDVALIDITY values (1.56 KB, patch)
2017-10-25 00:34 UTC, Michael Gratton
none Details | Review
Second log after patch (248.09 KB, text/plain)
2017-10-25 09:13 UTC, jerome.alv
  Details
Upper-case the fetch data type literals sent to the server (2.25 KB, patch)
2017-10-26 00:06 UTC, Michael Gratton
none Details | Review
New Log (451.46 KB, text/plain)
2017-10-26 13:11 UTC, jerome.alv
  Details

Description jerome.alv 2017-10-20 21:34:42 UTC
Created attachment 361985 [details]
log

Hi,

Sorry for my bad english.

I have some trouble with an IMAP account, that doesn't load any list of my folders. I can send emails but I can't load anything...

Here is my log.

Hope you will find something.

Regards,
Comment 1 Michael Gratton 2017-10-23 00:12:53 UTC
Hi Jerome, thanks for reporting this bug.

The version of Geary you are using (0.10) is now unsupported, and the issue might have been fixed in the current release (0.12). It looks like you are using Geary on Ubuntu or a derivative of it, so you can upgrade to the latest release either using Flatpak or the official Geary PPA: https://launchpad.net/~geary-team/+archive/ubuntu/releases - can you please try upgrading and let us know if that fixes the issue?

If upgrading does not help, it would be good to get some additional debug logging from you and I'll see if I can come up with a patch to fix the issue.
Comment 2 jerome.alv 2017-10-23 00:22:09 UTC
Created attachment 362064 [details]
New log on version 12.0
Comment 3 jerome.alv 2017-10-23 00:22:20 UTC
Hi Michael and thanks a lot for helping me,

I saw this story of version yesterday so I alrady upgraded Geary, I just forgot to update this report, but the bug is still here. I just update the attachment : it seems that the bug is between lines 161 to 202...
Comment 4 Michael Gratton 2017-10-23 02:00:31 UTC
Thanks for doing the upgrade, shame that wasn't a quick fix though. To look into this further, since it's not entirely clear what the syntax error is that the server is complaining about from the standard logs, can you try two things for me:

1. Run Geary using "geary -d --log-network |& tee geary.out" and after the error occurs, quit Geary. This will produce a lot of debug ouput, and also copy the debug output to the file "geary.out". Since the file may include your password, attach/paste only the lines from the log file that show the same issue that you pointed out above, +/- approximately 20 lines around them.

2. We may be sending the mailbox name "Junk?" to the server unquoted. Although this is legal by the IMAP standard, may not be appreciated by the server. If possible, can you try using a web mail or other client such as Thunderbird to rename the mailbox to not include the "?", then run Geary again and see if the server still complains? Feel free to rename it back afterwards, obviously.

Cheers!
Comment 5 jerome.alv 2017-10-23 08:18:40 UTC
Created attachment 362071 [details]
geary.out

Thanks again Michael,

- Here is the geary.out you asked for. 

- About the junk folder named "Spam?", unfortunately I can't rename it, neither in another client, nor in the original webmail : "IllegalSpecialFolderOperation"...

So I guess we have to find something else..!

Best regards,
Comment 6 Michael Gratton 2017-10-24 05:00:37 UTC
Created attachment 362131 [details] [review]
Always quote mailbox names
Comment 7 Michael Gratton 2017-10-24 05:01:03 UTC
Created attachment 362132 [details] [review]
Upper-case the status command literal sent to the server.
Comment 8 Michael Gratton 2017-10-24 05:02:19 UTC
Created attachment 362133 [details] [review]
Upper-case the status data type literals sent to the server.
Comment 9 Michael Gratton 2017-10-24 05:07:05 UTC
Hi Jerome,

I've just attached three patches with potential fixes. Can you try building Geary from git on the "geary-0.12" branch from https://git.gnome.org/browse/geary/, and apply each patch in turn to see which one (if any) fixes the issue?

If you need some help to compile Geary let me know, and I can either walk you through it or provide some test builds that you can use.

Thanks!
Comment 10 jerome.alv 2017-10-24 10:06:23 UTC
Wow Michael,

It worked !
But I have to confess, I didn't know how to patch the files so I did it manually (because I seen it was minor corrections). So I applied all 3 patches, it didn't work. Then I reinstalled Geary "sudo make uninstall, sudo make install", and it worked great. Now I am embarrassed because I can't tell you which patch done the effect. So I'm going to retry one by one and tell you.

(by the way I don't know if I compiled correctly with Git : I just downloaded 	geary-geary-0.12.0.zip, unziped it and then I followed the instructions).

If I let you know what was the good patch, will it be implemented in the deb repository one day ?

Best regards,
Comment 11 jerome.alv 2017-10-24 12:35:15 UTC
Ok, here is an update :

- After testing each patch individually : the third patch is the one which works (imap-status-data-type.vala) : I am able to see correctly my folder list !

- But it seems that half of the path is done here : I can see all my folders, and how many reed and unreed mails I have in each folder (the numbers are correct when I compare with thunderbird), but the mail list never appears and stays empty. (it was already the case with the others patches)

I'm going to send a new log, but maybe you want me to open a new bug ?

Thanks again,
Comment 12 Michael Gratton 2017-10-24 12:50:57 UTC
Thanks for testing the patches out! Building from the zip file and manually applying them is fine by me if it works for you. And yes, I will indeed get these fixes into the next release so you don't have to run a custom build.

I wonder if the mail is not appearing for the a similar reason, so yes, if you could attach a new debug log here (just using "geary -d" would be fine) I'll keep on looking into it.
Comment 13 jerome.alv 2017-10-24 12:54:56 UTC
Created attachment 362179 [details]
my new log

I should have notice : Gmail is still working fine
Comment 14 jerome.alv 2017-10-24 12:57:20 UTC
Sorry I didn't seen your last message, I used "geary -d --log-network", is it ok ?
Comment 15 Michael Gratton 2017-10-25 00:34:57 UTC
Created attachment 362232 [details] [review]
Work around servers that send 0 as UIDVALIDITY values

That log file was fine, no problem.

Can you try applying this new patch (in addition to the third patch that solved the listing issue) and see if that fixes conversations not showing up in folders?

Cheers!
Comment 16 jerome.alv 2017-10-25 09:13:51 UTC
Created attachment 362239 [details]
Second log after patch

Thanks you again Michael,

Unfortunately the patch doesn't work... I hope you'll find what's wrong.

Cheers !
Comment 17 Michael Gratton 2017-10-26 00:06:45 UTC
Created attachment 362299 [details] [review]
Upper-case the fetch data type literals sent to the server

Hey Jerome, here's another patch to try out. This should be used in conjunction with patches #3 and #4.

As an alternative to manually applying these patches, I've pushed the current set of patches to a branch in git. This might be a bit easier for you to work with, since you can just run a simple command to get the changes.

To clone the repo from git and get on the correct branch:

> git clone https://git.gnome.org/browse/geary geary-git
> cd geary-git
> git checkout wip/789271-contact-office-0.12
> ./configure

You can then build it as usual.
Comment 18 Michael Gratton 2017-10-26 00:14:21 UTC
After doing some research into it, it looks like Lumière University Lyon 2 is possibly using ContactOffice (a Java-based solution) for their IMAP server: The host name imap.univ-lyon2.fr is an alias for bv.univ-lyon2.fr, and "bv" is short for "bureau virtuel", i.e. "virtual office", and the POP server on that host reports it is ContactOffice in its hello message.

Just adding this information here and updating the summary so that other people can find it if they are having the same problem.
Comment 19 jerome.alv 2017-10-26 13:11:40 UTC
Created attachment 362346 [details]
New Log

Hey Michael,

Thanks again for what you are doing. I hope I will be able soon to use Geary ! I used you're instruction for git, it works great ! But sadly for now, your patch seems to not produce anything... I let you check my new log.

I hope you'll find !
Comment 20 Michael Gratton 2017-10-30 23:19:20 UTC
Hey Jerome, thanks for that. To try to make this process a bit easier, I just contacted ContactOffice to ask for a test account for myself. I'll let you know what happens when I head back from them.
Comment 21 jerome.alv 2017-10-31 11:01:28 UTC
Hey Michael,

Thanks very much for your commitment on this case. Count on me to stay aware of this bug
Comment 22 Michael Gratton 2018-02-07 06:22:06 UTC
I believe I have a test account now so will look into it as soon as I can.
Comment 23 jerome.alv 2018-02-07 09:09:46 UTC
A ContactOffice account ?

Happy to have some news, I'm still very interested in using Geary !

Good luck with this !
Comment 24 Michael Gratton 2019-02-08 05:12:49 UTC
Hey Jerome,

Apologies for taking so long with this, but I believe I now have Geary working with ContactOffice. It seems like they use Mailfence's server software for their email, and the software has some bugs that cause it to not understand Geary's use of lower-case IMAP and SMTP commands.

I've pushed workarounds for this to the `wip/789271-mailfence-contact-office-compat` branch in git. Could you try compiling Geary from that branch and let me know if it works for you? If you can get it done in the next few days, I should be able to include the fix in the next release, which will be coming out next week.

If you can test it, please let me know either here or on the merge request for it in Gitlab: https://gitlab.gnome.org/GNOME/geary/merge_requests/101

Thanks!
Comment 25 jerome.alv 2019-02-21 11:46:21 UTC
Hi Michael,

Thanks for having worked so long on this..!
Unfortunately, my Uni doesn't use ContactOffice anymore (since about six months), so I can't test your merge anymore... so bad, I'm sorry !

I hope you will find somehow a way to test it.

Best regards,

Jerome
Comment 26 Michael Gratton 2019-02-21 13:39:57 UTC
No problem, I merged it anyway for the next feature release so it can get some testing, and maybe save some people some pain in the future.