Add mail profile folder mapping for standard IMAP folders #15

Open
opened 2026-07-14 17:45:09 +02:00 by zemion · 1 comment
Owner

Context

IMAP append was moved out of generic server settings and is now a campaign delivery setting. The old shared server settings UI also exposed a single Sent folder value, but the more durable design is profile/server-level folder mapping for standard IMAP folders.

Scope

Add mail-profile folder mapping in govoplan-mail for standard folders such as Inbox, Sent, Drafts, Trash, Archive, and Junk.

  • Persist mappings per mail profile/server configuration.
  • Reuse the existing IMAP folder listing/detection endpoints where possible.
  • Migrate or round-trip the existing imap.sent_folder value as the Sent mapping.
  • Let campaign IMAP append keep its campaign override, while being able to default from the selected profile mapping later.
  • Keep campaign consumption behind core/mail capabilities rather than direct module-to-module UI imports.

Acceptance Criteria

  • Mail profile settings can save and display standard folder mappings.
  • Existing profiles with imap.sent_folder keep their effective Sent folder.
  • Folder lookup can populate a detected Sent folder and expose available folders for mapping.
  • Campaign append behavior remains backward compatible with the stored campaign override.
  • Backend and WebUI tests cover save/load, migration or compatibility, and the profile editor model.
## Context IMAP append was moved out of generic server settings and is now a campaign delivery setting. The old shared server settings UI also exposed a single Sent folder value, but the more durable design is profile/server-level folder mapping for standard IMAP folders. ## Scope Add mail-profile folder mapping in `govoplan-mail` for standard folders such as Inbox, Sent, Drafts, Trash, Archive, and Junk. - Persist mappings per mail profile/server configuration. - Reuse the existing IMAP folder listing/detection endpoints where possible. - Migrate or round-trip the existing `imap.sent_folder` value as the Sent mapping. - Let campaign IMAP append keep its campaign override, while being able to default from the selected profile mapping later. - Keep campaign consumption behind core/mail capabilities rather than direct module-to-module UI imports. ## Acceptance Criteria - Mail profile settings can save and display standard folder mappings. - Existing profiles with `imap.sent_folder` keep their effective Sent folder. - Folder lookup can populate a detected Sent folder and expose available folders for mapping. - Campaign append behavior remains backward compatible with the stored campaign override. - Backend and WebUI tests cover save/load, migration or compatibility, and the profile editor model.
Author
Owner

Drift note, 2026-07-20: the shared dirty workspace contains an uncommitted fix for quoting IMAP mailbox names. Preserve or isolate that fix when implementing folder mapping, with focused tests for spaces, delimiters, non-ASCII names, and provider-specific quoting.

Drift note, 2026-07-20: the shared dirty workspace contains an uncommitted fix for quoting IMAP mailbox names. Preserve or isolate that fix when implementing folder mapping, with focused tests for spaces, delimiters, non-ASCII names, and provider-specific quoting.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-mail#15
No description provided.