#1329 new
Pradip Thachile

"IMAP Problem for account"

Reported by Pradip Thachile | November 30th, 2015 @ 06:47 PM

As of about 14 hours ago, I've been getting an error message when using MailMate: "IMAP Problem for xxx@yyy account" referring to a UIDVALIDITY value. A screenshot of the message is attached and I've tried each of the three provided options. "Retry" just results in the message recurring. The other two don't seem to do much (as an end result). At the end of the day, it looks like all of my messages in MailMate have disappeared (other IMAP clients like Apple Mail, or web clients seem to work fine). After a while I get a slew of messages (~6000 at last count) from "Mailmate IMAP Connection" with a subject of "Unexpected Server Response". These messages don't show any content. See the second attachment for an example. As of this time, MailMate is no longer useable for me.

Comments and changes to this ticket

  • benny

    benny December 1st, 2015 @ 07:04 AM

    I'm sorry about your trouble. I'll do what I can to help you (and me if it's a MailMate bug) to resolve it.

    The UIDVALIDITY problem is usually a sign of a serious IMAP server issue. This value is used to uniquely identify a given mailbox. For example, think of the following scenario:

    • Two email clients use the same account.
    • One of them is offline and the other one is online.
    • The online client is used to delete all emails in mailbox A and then the mailbox itself.
    • The online client is also used to recreate mailbox A and add some messages to it.
    • Now, the offline email client is taken online and tries to synchronize A.

    This is where UIDVALIDITY is important. The deletion/recreation of mailbox A has triggered a new UIDVALIDITY value to be created for the mailbox. This helps the offline email client to detect that it's no longer the same mailbox and it must delete its local cache and refetch its contents.

    (Of course, some buggy email clients might ignore UIDVALIDITY changes, but this is very dangerous because the mapping between the local cache and the online messages is no longer correct.)

    If you still get the UIDVALIDITY warning then I'd like you to do as follows:

    • Open the “Activity Viewer” (⌥⌘0).
    • Trigger the UIDVALIDITY warning.
    • Use “Help ▸ Send Server Logs”.

    The “dummy” messages is a different issue. This is a sign that MailMate has given up on fetching certain (all?) messages due to some unexpected response from the server. This could both be an IMAP server bug or a MailMate bug. You can try selecting one of the messages and then use “Message ▸ Reset” to force MailMate to refetch it. If it fails again then send me logs like above.

    (Note that other email clients working is not always a sign of a bug in the email client not working. Most likely they are simply not triggering a server issue (using different IMAP commands) or they already have a workaround for a server issue.)

  • Pradip Thachile

    Pradip Thachile December 1st, 2015 @ 07:24 AM

    I've attached a server log report for the UIDVALIDITY issue.

    As for the second problem with "dummy" messages, selecting all the messages and using Message > Reset made all the messages just disappear.

  • benny

    benny December 1st, 2015 @ 07:40 AM

    I'm not sure what's up with the dummy messages, but I guess the two problems are likely related. Were these messages in the same mailbox as the one with the UIDVALIDITY problem? If not, is the mailbox online if you look under SOURCES in the mailbox list (online means 'not greyed out').

    With respect to the UIDVALIDITY issue then the mailbox is seriously messed up on the server. You should report this to the provider. You can point them to this ticket if you like. Here is the relevant part of the log:

    07:20:11 C: G4 SELECT EECG  
    07:20:11 S: * 4294 EXISTS  
    07:20:11 S: * 4294 RECENT  
    07:20:11 S: * OK [UIDVALIDITY 0] UIDs valid  
    07:20:11 S: * OK [UIDNEXT 1] Predicted next UID  
    07:20:11 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)  
    07:20:11 S: * OK [PERMANENTFLAGS (\* \Answered \Flagged \Deleted \Seen \Draft)] Permanent flags  
    07:20:11 S: G4 OK [READ-WRITE] SELECT completed  
    07:20:11 C: G5 NOOP  
    07:20:11 S: G5 OK Success  
    07:20:11 C: G6 UID FETCH 1:4294 (UID)  
    07:20:11 S: * 1 FETCH (UID 1)  
    07:20:11 S: * 2 FETCH (UID 2)  
    07:20:11 S: * 3 FETCH (UID 3)


    • A UIDVALIDITY value is returned which shows the server claims UIDs are supported for the mailbox.
    • But the UIDVALIDITY value is 0 which is not a legal value (maybe MailMate should simply stop trying at this point).
    • The UIDNEXT value is 1. This is impossible given that UIDs 1-4294 are already used. UIDs must be increasing.

    Only an online email client with absolutely no caching of messages can work with this mailbox. An email client using UIDs while ignoring the UIDVALIDITY problem would do so at the (very likely) risk of deleting the wrong messages.

    Note that you can take this specific mailbox offline in MailMate and then see if the problem also exists for other mailboxes.

  • Pradip Thachile

    Pradip Thachile December 1st, 2015 @ 08:08 AM

    The dummy messages were in the folders with the UIDVALIDITY problem (which are all of my folders). The mailbox is definitely online, and taking it offline and back online doesn't accomplish anything. I see no messages and just get a "loading spinner" icon on all my folders until all my folders eventually say "offline". Selecting them after this state will just repeat this cycle.

    You also mention that only an online e-mail client with absolutely no caching of messages can work, however Apple Mail and Thunderbird seem to work just fine. Did you mean that only online clients that don't cache, will work (correctly), as opposed to other online clients that do cache.

    At this time, I'm dead in the water with MailMate and am using Apple Mail (ick). Can you recommend any mail hosting providers that will work well with MailMate? I've been using Zoho E-mail and it's been working wonderfully save this problem.

  • benny

    benny December 1st, 2015 @ 08:22 AM

    I think Thunderbird has an online mode (not 100% sure), and maybe it switches to that when it sees a UIDVALIDITY value of 0. That would be the only safe way to work like this (MailMate has no online mode, that is, a mode which completely ignores UID/UIDVALIDITY values).

    Let me try to explain why ignoring the UIDVALIDITY problem is bad (if this is what Apple Mail does). The logs you sent me indicate that message numbers and UID values map exactly 1-1. For example:

    07:20:12 S: * 4293 FETCH (FLAGS (\Recent \Seen NonJunk) UID 4293)
    07:20:12 S: * 4294 FETCH (FLAGS (\Recent \Seen) UID 4294)

    The first number in the line is the message number. This is always sequential, that is, if there are 4294 messages in the mailbox then they are numbered 1-4294. If you delete message 4293 then the message previously numbered 4294 becomes 4293. The UID values are persistent. If you delete the message with UID 4293 then there is never again going to be a message with UID 4293 (unless UIDVALIDITY changes for the mailbox).

    You could try this: Use Apple Mail to delete one or more messages in the EECG mailbox, for example delete the oldest one. Then repeat the logging done for the mailbox in MailMate. We should then, hopefully, see that the message numbers and the UID values are no longer 1-1. If not, then it's dangerous to use any (offline) IMAP email client with this account.

    I have some suggestions for alternative IMAP providers here.

  • Pradip Thachile

    Pradip Thachile December 5th, 2015 @ 02:36 AM

    I'm now getting some crashes from Mailmate potentially related to this issue. Attached is the crash report. I am migrating my mail to another provider soon and will see if the problem persists.

  • benny

    benny December 5th, 2015 @ 07:11 AM

    This issue may have been caused by the server issue, but it's also some kind of MailMate bug. MailMate is in the process of cleaning the database of a mailbox “deleted” server side (perhaps changed UIDVALIDITY) and this triggers a bug. I don't have time to debug before Monday though.

    (It should stop if you take the account offline.)

  • benny

    benny December 8th, 2015 @ 12:05 PM

    • State changed from “new” to “cantreproduce”

    Sorry about the late reply. Is this problem reproducible for you?

    (I'm pretty sure it is triggered by the UIDVALIDITY issue, but this does not mean it couldn't happen in situations where, e.g., the user uses a different email client to delete an IMAP mailbox containing emails.)

    If it's reproducible then I have some additional debug steps.

  • Pradip Thachile

    Pradip Thachile December 9th, 2015 @ 05:28 AM

    After I moved to a different mail service. This is not reproducible.

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