Using IMAP for Gmail issue

Hello.

Due to the recent issues with checking Gmail in 3.5.23, I decided to switch to IMAP (I need 3.5.23 anyway since I got another IMAP account check working fine).

However, it does not work... All settings are correct, X-Notifier connects and starts checking email, but then stopsand marks account as "not checked".

I have a lot of emails... So I suspected it have problem because if this...

Once I enabled and checked debug log the problem became apparent - there is so much email, that X-Notifier tries to open many connections to IMAP - and Gmail only supports maximum 15, so after some work, X-Notifier gets this from Gmail server:

xxxxxx@gmail.com|imap.gmail.com    302    A099 NO [ALERT] Too many simultaneous connections. (Failure)\r\n

Question - is there any way to restrict X-Notifier from opening that many IMAP connections?

I don't have more than 3 accounts with any provider... but I have tested both IMAP and POP3 with my Gmail accounts and they both check for new mail just fine. Perhaps you could set some accounts to POP3.
Or... you might run two browsers, FF and Chrome, etc.
Or... perhaps you could try setting different check intervals on the accounts (avoid multiples of same number). You may have to turn off 'check on startup' so they don't all fire off at once on startup.

No, I am talking about checking ONE Gmail account only, it has ~200 unread out of ~5200 total messages in the inbox.

I do not like POP3 handling of messages, so I'd prefer IMAP, but implementation seems to have some issue. Looking at the netstat output as well as at X-Notifier log taken on clean start and one check with one IMAP Gmail enabled, I see it openning 16 connections and the 16th one is getting the error - searching for the string "OK Gimap ready for requests from <myip>" lists 16 unique connections - it looks like X-Notifier opens new connection for each IMAP request.

If I have more time, I'll try to compare this with different IMAP account, which works fine and also dig at the source a bit. However it is dissapointing that it is not working.

I suppose your Gmail is set up differently than mine... I have no real idea of the connectivity issues, but... how  many folders do you have? And in your X-Notifier Gmail account definition, is 'Show folders' checked?   The embedded Gmail script in X-Notifier refers to 'labels', but the IMAP script setting is 'folders'. Just throwing out a shot in the dark.

Well, I have many folders - did not count, but at least 50.

I had "Show folders" enabled, but tried to disable just now - makes no difference so far.

What is strange - my other IMAP account (with FastMail) works properly...

 

How many devices do you have accessing the problem account?  How many programs (MS Outlook, etc.?)
Are they syncing more than just the inbox?
It's been a while, but I believe you can choose which folders to sync, yes?
Multiple devices, multiple programs, multiple folders... can = lots of connections, apparently.
Also... restart the browser/whatever, just to be sure UNchecking 'Show folders' is restarted/reset.
I read an old complaint about this issue where people have Gmail set up via IMAP on their smartphones and supposedly as you move from cell tower to cell tower you get a new IP address and so new connections to Gmail. Their tedious workaround was to login to Gmail via webbrowser and at the bottom it would say 'last known connection' or something and you could view details and clear connections... or something like that.

I am only using this one instance of the FF for IMAP access to Gmail - and that is where all 15 connections are coming from - I can easily see them (netstat).

Not sure what you mean by "choose which folders to sync" - this usually for normal IMAP client, X-Notifier has only other option - "Notify Inbox only" and I have it checked.

I did restart the browser and captured more logs. It behaves a bit different with "Show folders" unchecked - X-Notifier seemss get much farther in retrieving messages, but still ends up with 15 connections and "not checked" status.

I got X-Notifier grow up to 50Mb, it gets many message IDs... I do not have much time to re-learn IMAP protocol now and spend more to troubleshoot this - because even if I find a bug, I won't be able to fix it myself and chances it being fixed in older version of X-Notifier are slim.

There is an option in Gmail to restrict number of messages in IMAP folders it advertises, with minimum being 1000 - I'll see if enabling this will help.

But more and more I am spending time on this, I am thinking of getting separate email app running again...