mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 00:12:39 +00:00
The Sieve generator wrote actions in the order they were picked in the rule editor. `fileinto` stores the flags set at that moment, so "mark read", "star" or "add label" placed after a move never reached the moved message. Flag actions are now emitted first. Moves and copies also targeted the folder by path only. Renaming the folder silently sent the rule's mail to Inbox. Rules now store the folder id and emit `fileinto :mailboxid "<id>" "<path>"` when the server lists `mailboxid` (declaring `mailbox` too, which Stalwart requires), with the path as the fallback. Saving a rule refreshes the path from the id, so existing rules pick up the id on their next save. Forward actions get a "Keep a copy" option (`redirect :copy`), and the editor honours the server's `maxNumberRedirects` (1 on Stalwart): forward is disabled once the limit is used up, with a hint when existing rules already exceed it, because the server skips extra redirects without telling anyone.