Sync is stuck
The sync fetches new mail, pushes local changes to the server and keeps both sides identical. When it stalls, it helps to know which of the three cases you have. They look alike but have different causes.
How the sync works
Section titled “How the sync works”The server reports new mail in the inbox immediately (IMAP IDLE). YouniqMail syncs any other folder as soon as you open it, at most once a minute. Every ten minutes a full sync of all folders runs in addition as a safety net. Folders with notifications turned on are also checked for new mail every minute (not on Gmail). You don’t have to set an interval, and there isn’t one.
Case 1: the first sync takes long
Section titled “Case 1: the first sync takes long”After setup, YouniqMail first loads the overviews of all mail in all folders (on Gmail without “All Mail” and the label folders). The contents come right away for the last 60 days, but at least for the newest 800 emails of the account, folder by folder starting with the inbox; the rest follows bit by bit in the background. The first sync holds back emails over 10 MB and loads them in the background afterwards (“Processing large emails in …”). For emails over 50 MB, opening loads only the text parts; if that is not enough, the email offers Load in full. For a mailbox with many years of history that is simply a lot of work.
In a wide window, the header shows the progress next to the sync button, for example “Loading Headers 120/5000”. How far the background loading has got is shown on the dashboard and under Settings → Advanced, in the Background Sync section. You can work right away: whatever is already loaded is fully usable, an email still missing loads when clicked, and search grows with the collection.
Case 2: new mail stops arriving
Section titled “Case 2: new mail stops arriving”When a previously fine account fetches nothing new:
- Trigger by hand: the Sync emails button at the top of the header, or the Refresh Mailboxes shortcut (by default Cmd+Option+S on the Mac, F5 on Windows and Linux). This also fetches a fresh folder list. If the sync runs through, it was a momentary hiccup. While offline and while a sync is running, the button is disabled. An account paused after a refused sign-in gets a new sign-in attempt right away this way; on its own it tries only every 30 minutes. The notice under Settings → Email Accounts then names the reason as well.
- Error marker on the account? A red warning triangle at the account name in the sidebar names the reason on hover. Sign-in errors and their fixes are covered in Connection fails.
- Is it the folder? Mail can be filtered server-side too: a look into spam and other folders in the webmail settles whether the mail reached the inbox at all. For that there is My emails are not arriving as its own guide.
Case 3: local changes do not reach the server
Section titled “Case 3: local changes do not reach the server”Deleted mail reappears in the webmail, read status springs back? Then the reverse direction is stalling.
YouniqMail collects actions performed offline in Outbox / Pending Actions (the entry appears in the sidebar as soon as something is waiting) and replays them once the connection returns, on their own and with retries. If an action fails for good, the entry shows the error with Retry action and Discard; usually the same cause as case 2 hides behind it, say a password gone stale.
Some servers (hMailServer, for instance) cannot remove an email deleted in YouniqMail right away; it stays there marked as deleted. If right-clicking the folder then offers Remove deleted messages from server…, that cleans up the folder on the server.
An email is marked for deletion
Section titled “An email is marked for deletion”Some programs delete in two steps, Thunderbird or Outlook for example when set up that way. They first only mark a mail as deleted and remove it when they clean up the folder. YouniqMail shows such a mail with Marked for deletion by another program above it. As soon as any program cleans up the folder, it is gone for good.
To keep it, click Remove deletion mark or move it to another folder. Both take the mark off on the server too, and the button needs a connection for that. If you leave the mail as it is, the other program’s decision stands.
If none of that bites
Section titled “If none of that bites”- Restart the app. Inelegant, but reliably clears hung connections.
- Resync the folder: right-click the folder → Force full resync of folder. The folder is reloaded from the server; tags and notes are kept.
- Repair contents: under Settings → Advanced, Repair Email Bodies reloads emails whose content could not be loaded, and Rebuild Email Threads reassigns conversations.
- Read the logs: with debug logging turned on, the sync records in detail what it does and where it fails.
- As a last resort, remove the account and set it up again: the mail lives on the server and comes back completely. Tags and their colors are kept; the assignments come back if the server stores custom keywords. Back up first: removing the account also removes its local data, including notes, snoozes, follow-ups and pinned emails. If the account has its own private PGP keys or S/MIME certificates, the dialog offers to move them to another account with the same address; otherwise YouniqMail deletes them with the account. A backup beforehand is duty here, not courtesy.