[Dovecot] changing flags automatically
Lutz Preßler
Lutz.Pressler at SerNet.DE
Thu Mar 28 15:56:34 EET 2013
Hello,
(2.2:) there is no doveadm subcommand to change flags of messages, is it?
The following should work reliably?
# mark messages with subject $SUBJECT in mailbox $MAILBOX of user $USERID as read
( i=2
echo "1 SELECT "$MAILBOX
doveadm search -u $USERID mailbox $MAILBOX subject "$SUBJECT" \
| while read g u
do
echo $i" UID STORE "$u" flags (\Seen)"
i=$((i+1));
done
echo "0 LOGOUT"
) | /usr/lib/dovecot/imap -u $USERID
Greetings,
Lutz
More information about the dovecot
mailing list