Connection form: INBOX is accepted although the form and the README say the inbox is never read #12
Labels
No labels
bug
documentation
enhancement
performance
security
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-imap#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo-imap at
cc09c6381, readingvalidate()against the texts the form and the README show, and running it on the snapshot.The form's help text, its validation message and the README all promise that Postulo never reads the inbox. Nothing enforces that:
validate()only checks that the folder is not blank, soINBOXis saved like any other name. Because a pass flags or moves every message it fetched, recognised or not, the cost of typing it is larger than "the inbox gets read".src/postulo_imap/sync.py:123-129,ImapSync.validate(): the only folder check isif not str(config.get("folder", "")).strip(), and its message is "Name the folder to read. Postulo never reads the inbox." The onlymove_tocheck is that it is not blank whenmarkismove.src/postulo_imap/sync.py:76-80: the help text "One folder, never the inbox. … Postulo reads nothing else."src/postulo_imap/sync.py:214-217:box.mark(uids)andbox.move(uids, …)receive every uid the search returned, including the messages for whichclassify()returnedNoneatsync.py:183-186.README.md:31-33: "Postulo never reads your inbox, and it reads nothing but this one folder."README.md:62-64adds that for mail the rules do not recognise "your mailbox is left as it was", which is not whatsync.py:214-217does;tests/test_imap.py:561asserts that the unrecognised message is flagged too.validate({…, "folder": "INBOX"})andvalidate({…, "folder": "inbox", "mark": "move"})both return{}(run against the snapshot). A person who has not made the Jobs folder yet typesINBOXto try the plugin. With the default Flag it mode, every message of the last thirty days in the inbox is fetched whole (BODY.PEEK[]), run through the rules and given the$Postulokeyword. With Move it to a subfolder, all of those messages, recruiter mail or not, leave the inbox forJobs/Readon the first pass.validate()equally returns{}formark=movewithmove_toequal tofolder; in that mode the keyword is not used, so every pass fetches and moves the same messages again.validate(), refuse a folder that isINBOXafter stripping, compared case-insensitively (IMAP treats that one name case-insensitively), with a message that says why; and refusemove_toequal tofolderwhenmarkismove. If reading the inbox is to stay possible, put it behind an explicit confirmation field with its own warning, as postulo/postulo#34 described, and soften the three texts to match. Either way, makeREADME.md:62-64true: say that an unrecognised message is still flagged or moved, or, in Move mode, move only the messages a suggestion was filed for.Done when
tests/test_imap.pyhas a test in whichImapSync().validate({**CONFIG, "folder": "inbox"})namesfolder, andvalidate({**CONFIG, "mark": "move", "move_to": "Jobs"})namesmove_to; both fail today.README.mdsay what the code does, including what happens to a message the rules do not recognise.Fixed by pull request #25.