mirror of
https://github.com/warmbly/warmbly.git
synced 2026-09-11 00:05:01 +00:00
The worker opened one IMAP session per mailbox at load and never re-dialed. When the server dropped it (Gmail does after a while), handleError mapped net.ErrClosed to nil, so every pass ran as a clean "no folders" pass: nothing logged, no error record, last_synced_at kept moving, no new mail for days, and sent copies failed with "use of closed network connection". - imap.Client: ensureConnected re-dials a client parked in Logout state; every entry point (Folders, AppendToSent, warmup actions) runs through it. - handleError: transport errors return a retryable server-unreachable error instead of nil, so the sync loop logs and retries. - Folders: LIST "*" instead of "%", which stopped at the top level and never reached [Gmail]/Sent Mail (or Dovecot's INBOX.*); request SPECIAL-USE, without which Gmail reports no \Sent/\Trash/\Junk/\All. - Sync: skip Gmail's virtual label views (All Mail, Starred, Important) so known mail is not re-filed as archive under a different UID; retire a cursor an earlier build baselined for them. "Bin" is trash.