#609 ✓closed
Mike L

Gmail IMAP "Unexpected return code 535 (expected 235)"

Reported by Mike L | January 29th, 2014 @ 10:20 AM

This error pops up a few times a week. It usually repeats for a while, until I give up, close MailMate and try again later. Or take the account offline, then online later.

The passwords are saved, so that can’t really be the problem. I never had this problem with Mail, using all the same settings, pw.

This is the only account I have problems with, and it’s hosted by gmail. Are there known issues with imap gmail?

Enter password for “XXXX@XXXXXXX.com” at “smtp.gmail.com”

Unexpected return code 535 (expected 235):
“5.7.8 Username and Password not accepted. Learn more at
5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ev4sm4246010wib.1 - gsmtp”.

Please enter password for user name “XXXX@XXXXXXX.com”.

Attached screenshot of the log file, but I'm not sure if useful information is in there. ("helloclue" is the name for the XXXX@XXXXXXX.com account in reference).

Comments and changes to this ticket

  • benny

    benny January 30th, 2014 @ 07:43 AM

    Just for the record, this is a problem with SMTP at Google and not IMAP.

    The error message from Gmail is not very specific and the link they provide seems to indicate that this can happen for other reasons than a password problem.

    Is there any pattern to the behavior? E.g., sending a lot of messages or changing physical location?

    It would be nice if Google could tell us what happens server-side :-)

  • Mike L

    Mike L January 30th, 2014 @ 09:06 AM

    Hi Benny, Yes, SMTP, not IMAP. The pattern is unclear to me. There were 2 emails waiting to send, and both had attachments, one small, one 'large' (65MB). That doesn't sound like a clue though.

    This has happened about 4-5 times for me. Usually waiting an hour with the account deactivated clears it up. Yesterday, it persisted for a long time, and I really needed to get some emails out, so I deleted, then added the account again, and the problem hasn't returned since. That approach also worked one other time. That might be a clue.

  • benny

    benny January 30th, 2014 @ 09:55 AM

    • State changed from “new” to “closed”

    I'm pretty sure the problem is that Google is locking you out temporarily because of the messages you have tried to send. It's probably a coincidence that re-adding an account fixes the problem.

    Here it is documented that you cannot send messages larger than 25MB: https://support.google.com/mail/answer/6584?hl=en

    Consider using Dropbox or some similar service for large files. Most people do not like receiving huge messages in their Inbox anyways.

    Here are various limits on the number of messages you can send: https://support.google.com/a/answer/166852?hl=en

    Let me know if you think MailMate also plays a part in this problem.

  • Mike L

    Mike L January 30th, 2014 @ 10:07 AM

    I'm pretty sure the problem is that Google is locking you out temporarily because of the messages you have tried to send. It's probably a coincidence that re-adding an account fixes the problem.

    Yep, I bet that's it. They didn't return an error, just closed the door. (How rude!)

    I'll try to replicate the issue and get back to you.

    Most people do not like receiving huge messages in their Inbox anyways.

    Agreed. Usually, but not always.

  • Mike L

    Mike L January 30th, 2014 @ 09:55 PM

    Hi Benny, I just received this message, but have not been sending any attachments. And not much activity in general. Nothing odd about my setup.

    Please let me know if there's anything I can do to troubleshoot.

    Server response: “D1 NO [ALERT] Too many simultaneous connections. (Failure)”. Command attempted: “D1 AUTHENTICATE PLAIN ••••••••••”.
    
    Please enter password for user name “mike@biowink.com”.
    
  • benny

    benny January 30th, 2014 @ 10:05 PM

    This is a different issue. Google has a maximum limit of 15 connections to the IMAP server (from 1 account). If you have multiple devices and email clients then you could break that limit. MailMate uses at most 3 connections.

    The latest test version of MailMate should be able to automatically decrease the number of connections used (but it won't help if not even 1 connection can be made). You can fetch it by holding down ⌥ when clicking “Check Now” in the Software Update preferences pane.

  • Chris Johnson

    Chris Johnson March 29th, 2014 @ 04:36 PM

    I have been experiencing this issue for the past several weeks while trying out MailMate. I'm using application specific passwords, and I can work around this by creating a new app specific password, but MAN, what a pain that is. Not sure if this helps in a resolution, but I can attest that I'm seeing this happen.

    Chris

  • benny

    benny March 31st, 2014 @ 07:44 AM

    Maybe the original poster can tell us if he also uses application specific passwords. I cannot find any documentation about what could trigger Google to automatically revoke an application specific password, but if it happened then I would assume you could see it had changed state (or disappeared) in your list of application specific passwords.

    Instead of generating a new password have you tried just logging into Gmail?

    How often does this happen and are there any triggers such as a change of physical location?

    For the record, MailMate doesn't really do anything but use the password provided, but if possible I am of course willing to change anything that triggers this Gmail behavior — if we can figure out what it is.

  • mrspaceman

    mrspaceman March 31st, 2014 @ 11:05 AM

    Hello. I'm the original poster.

    Yes, I do use application specific passwords. Hey, a clue!

    This problem has continued for me, and here are other thoughts, if helpful.

    @Chris, do you use K-9 email client on your mobile? I use K-9 on Android. I've posted a question concerning this to K-9 forums a long time ago, but never received a response. Is it possible K-9 (or your mobile client) could keep more connections open than is typical? I've searched for a way to modify this setting in the app, but have been unable to find it.

    This is what I've noticed:

    • This error only appears when combining MailMate with Gmail, not with any other email providers (I have 3: Gmail, Rackspace, Gandi).
    • I tried Mac Mail, Airmail and Thunderbird desktop clients all for extended periods and this error never popped up.

    ( Despite this, MM is still the best <3 )

    All my evidence supports the reasoning Benny described:

    • it happens the most when I emerge from an area with zero or weak 3/4G access (emerge from subway and open laptop w/in 5 min)
    • if I turn off my mobile network a few min before opening my laptop, the error doesn't happen
    • if I turn off syncing or turn on airplane mode for a while, the error goes away (10 min wait)
    • the problem only happens when my mobile is on its mobile 3/4G network and while my desktop is on wifi (always).
    • I frequently notice a weak wifi connection on my mobile when it happens (hypothesizing it may be frequently also pinging 3/4G networks)

    My mental model / hypothesis:

    When I have zero or weak 3/4G connection on my mobile, it gasps to create a connection via any network protocol it can. K-9 is also looking for a ping, so that ping goes out to different towers and different protocols simultaneously. Gmail's bouncer must behave differently than my other email providers (Rackspace, Gandi), so G-Bouncer keeps the velvet rope shut until the ping-party calms down.

    My workarounds:

    • make sure my mobile is always accessing known wifi networks, so it stops pinging cell towers when I'm most likely to open my laptop (work, home and known cafes)
    • If I'm worried the problem might be waiting for me when I get to my desktop, I usually just switch to airplane mode (if I remember).
    • If I'm leaving my desktop for a while, I put the computer to sleep, so it only starts pinging until after I've switched my mobile to Airplane mode.
    • If I'm using my mobile w/ laptop in my kitchen (weak 3/4G and weak wifi), I turn off email syncing on my mobile.

    Still have only had this come up with MM, but using these workarounds makes it almost never happen anymore.

    Happy to answer more questions if helpful.

  • benny

    benny March 31st, 2014 @ 11:14 AM

    @mrspaceman: Just a quick note. The “too many connections” problems is probably not the same issue as the one in the first post in this ticket. It is also important, but let's focus on the application specific passwords first.

  • mrspaceman

    mrspaceman March 31st, 2014 @ 11:16 AM

    Gotcha, sorry about that.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages