Busy with setting up SIEVE scripts to manage plethora of “sysadmin” and “invoices” emails that historically pointed to my personal user’s emails so still in the process of fixing all the sources, but in the mean time I’d like to have a SIEVE script that would write the emails directly to the relevant group account’s storage.
I considered the direct write to “shared folder”/group@domain/folder but that doesn’t seem to be supported by Stalwart.
The response I got from Claude was:
- "Shared Folders/..." prefix = IMAP-session-layer illusion. Delivery never sees it. fileinto :create "Shared Folders/reports@dom/X" silently creates literal local folder tree in your account — mail never reaches group. Nasty trap.
- Dovecot Pigeonhole can do this (ACL p right); Stalwart chose not to.
- Working pattern: deliver (or redirect :copy, budget 1/run) to group address → group's own admin-assigned Sieve files into subfolders.
Is this correct?
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
I understood correctly that you are trying to organize emails inside a group email adress (moving from Inbox of a group mailbox to another folder in the same group mailbox)?
If that is the case you should put the script inside the group mailbox (in the account interface of a user who can read that mailbox you can check the group mailbox) and in that moment the folders can be acces directly (Inbox not Shared Folders/Inbox).
A Sieve script runs in the context of the account the mail is being delivered to, and fileinto can only target that same account’s own folders; fileinto :create just makes a literal folder inside the user’s mailbox, and the Shared Folders path is an IMAP namespace view, not a delivery target. So from userA’s script you can’t file into GroupB’s folder directly.
The supported way to do this is to redirect: in userA’s script, redirect “[email protected]” on the conditions you want (add :copy if you also want a copy kept for userA), and then let GroupB’s own Sieve file it into the target folder on arrival.