Skip to content

Auto-create Sent and Drafts default folders - #275

Closed
stephdl wants to merge 5 commits into
mainfrom
sdl-8104
Closed

Auto-create Sent and Drafts default folders#275
stephdl wants to merge 5 commits into
mainfrom
sdl-8104

Conversation

@stephdl

@stephdl stephdl commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Dovecot only auto-created Junk and Trash in the inbox namespace. Sent and Drafts were never created by the server, so they appeared only after the user sent a first message. When an IMAP client is configured before those folders exist, it can create duplicates (e.g. Italian Outlook creates Posta inviata instead of Sent) or fail to copy sent messages.

This declares Sent and Drafts as auto-created and subscribed mailboxes with their special_use flags (RFC 6154), so they exist at first mailbox access regardless of the client or webmail (Roundcube, WebTop, SOGo, IMAP clients).

Changes, mirroring the existing DOVECOT_TRASH_FOLDER pattern:

  • local.conf: two new mailbox blocks in the inbox namespace, auto = subscribe, special_use = \Sent / \Drafts.
  • reload-config: tmpl_sent_folder / tmpl_drafts_folder template variables (defaults Sent / Drafts).
  • build-images.sh: DOVECOT_SENT_FOLDER / DOVECOT_DRAFTS_FOLDER build-time defaults.
  • README.md: documented both variables.

Existing users get the folders at next mailbox access, no migration needed.

Ref: NethServer/dev#8104

This supersedes NethServer/ns8-roundcubemail#116, which only covered Roundcube at webmail login.

@stephdl

stephdl commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author
image

the folder are created at the first login

@DavidePrincipi

This comment was marked as duplicate.

@DavidePrincipi DavidePrincipi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the approach of the original PR from Federico, which limits the change to Roundcube, where the issue arises, compared to NS7. Maybe the recent RC update ships different a default for $config['create_default_folders']?

@stephdl stephdl closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants