Sieve, problem backing up mail

Steve George <[email protected]> Wed, 4 Jun 2025 09:44:04 +0100
Newsgroups gmane.comp.gnu.mailutils.bugs
Message-ID <nlcehmoi3hivcomyjplq5bqkngu4oow4hcwujt35we2vycib4b@5x4vzra52cjk>
Hi,

I've been experimenting with mailutil's `sieve` command and tried to backup all email like this:

    require ["fileinto", "variables"]
    set "folder" "maildir:///home/user/.mail/account";

    if exists "to"
    {
        fileinto "{folder}/backup-allmail/";
        keep;
    }

For some reason this seems to alter the flags on all mails in my account. I'm using `mbsync` to synchronise email, and if you run this rule mbsync then seems to update the flags on every single email in my inbox. So this means all n thousand emails are repeatedly being updated with 'something'. I can't figure out what mbsync thinks has changed, from what I can see this rule shouldn't touch any of the mails in my INBOX, any thoughts on what's wrong?

Steve / Futurile