mirror of
https://github.com/karatektus/pl_mail.git
synced 2026-10-25 10:04:18 +00:00
The review of #291 found three ways the first version lost or duplicated mail, and this reworks the syncer around them: - A UIDL is recorded as stored only once its row is committed, one message at a time. Failures are recorded as attempts, retried, given up on after three, and never deleted from the server. - Every session asks for its own numbering, and the delete marks are made only in the last session, for UIDLs recorded as stored. - The ledger is a pop3_uidl table pruned to what the server lists, instead of a 5,000-entry list in the settings bag that re-fetched the oldest mail of any larger mailbox on every sync. Mail comes in newest first. A server's -ERR on one message is that message's failure; a dropped connection ends the sync. The label repairs for the contributor's own deployment are gone. Switching an existing account between IMAP and POP3 keeps its mail: IncomingProtocolSwitch drops every server address the way a UIDVALIDITY change does, and the next sync recognises the rows by Message-ID (a TOP-based adoption pass for POP3, SentCopyReconciler::claim() for IMAP). ImapConnectionFactory refuses POP3 accounts, IDLE and the importer skip them. Also: translated section heading on the form, presets switch back to IMAP, zh_CN strings and sorted keys, POP3 ports in the connection test's hints, the forked socket test reports its verdict instead of exiting into PHPUnit, a handbook section and a changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>