Skip to content

Troubleshooting IMAP configuration

This page describes common issues you might encounter when using IMAP accounts with Nylas and how to troubleshoot them.

Passwords and character encoding

Nylas currently can’t authenticate an IMAP account if its password contains characters that are not in the ASCII character encoding. If you encounter an error during authentication, check if the account’s password contains characters outside the ASCII range. If it does, advise the user to update their password.

Troubleshoot UIDVALIDITY errors

When syncing messages with a provider, Nylas requires a persistent unique identifier across sessions. This ensures data remains consistent and up-to-date. When Nylas syncs an IMAP account, it uses two important identifiers to link the locally cached messages with those on the IMAP server:

If any UIDs changed between sessions, the provider uses the UIDVALIDITY value to signal that you need to clear your cache and look for the new UIDs.

For misconfigured providers, the UIDVALIDITY value might change with every session. Nylas uses several concurrent sessions to monitor IMAP accounts, and if each one has a different set of UIDs, maintaining data consistency is impossible. In these cases, Nylas stops syncing and presents a “Stopped due to too many UIDVALIDITY resyncs” error.

Error: Stopped due to too many UIDVALIDITY resyncs

Resynced more than MAX_UIDINVALID_RESYNCS in a row. Stopping sync.

If an account is in a Stopped state and the mailsync logs return the error above, this indicates that Nylas stopped syncing the account because of inconsistent UIDVALIDITY values between sessions. Because Nylas syncs across multiple sessions for an account, Nylas can’t link IMAP UIDs if the UIDVALIDITY value changes constantly.

Servers with inconsistent UIDVALIDITY are not supported until they adhere to the standards set forth in the RFC standard document. Nylas cannot work around the issue.

UIDVALIDITY and empty folders

In some cases, the UIDVALIDITY error is triggered on folders that contain no messages (and so have no UIDVALIDITY values). If this happens, the user can either…

  • Delete any empty folders.
  • Add at least one message to every empty folder and allow their account to resync.

UIDVALIDITY and Amazon WorkMail

If you connected an Amazon WorkMail account to Nylas using IMAP, your account might be in a Stopped state and you might find the following error in the mailsync logs.

Resynced more than MAX_UIDINVALID_RESYNCS in a row. Stopping sync.

The error message indicates that the email server doesn’t maintain consistent UIDVALIDITY values, and is therefore incompatible with Nylas.

You might be able to solve this issue by authenticating your Amazon WorkMail account using Microsoft Exchange’s advanced login settings and specifying one of the following server addresses, depending on your account region:

  • mobile.mail.eu-west-1.awsapps.com
  • mobile.mail.us-west-2.awsapps.com
  • mobile.mail.us-east-1.awsapps.com