On 15/01/2024 03:49, Kirill Korinsky wrote:
Greetings,

I can't figure out how doesn it possible to create a virtual folder which
contains mails which has falgs: \Flagged or any customers flag.

For example I do have a test mail:

mx2$ doas doveadm fetch -u kir...@korins.ky "mailbox flags" mailbox-guid 
fb9e821c7b778b658896000079e31c01 uid 67096
mailbox: Archive
flags: \Flagged \Seen $NotJunk NotJunk $MailFlagBit0 $MailFlagBit2 Invoice
mx2$

and virtual folder:

mx2$ cat /etc/dovecot/virtual/Flagged/dovecot-virtual
*
-INBOX/Trash
-INBOX/Trash/*
-INBOX/Junk
-INBOX/Junk/*
   flagged
mx2$

If I unset flag \Flagged from that mail, it dissapear from the folder.

So, how should I change definition to keep it here if it has user's specified
flags like Invoice or ASAP or whatsoever?

Hi Kirill

the possible criteria that can be used in the search criteria for virtual folders are the ones in the SEARCH part of the stanard.

There is a KEYWORD criteria for searching for a flag but it's only useful if you know the names of the flag.

There doesn't seem to be a wild card capability for the flag name or a search criteria that says "if there's any user flags" or for that matter "if there's any flags". The flagged criteria only checks for the \Flagged flag, so the behaviour where it disappears from the folder when removing \Flagged looks correct.

John


_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to