How does one mark all messages as read (imap4flag "seen") with sieve?

Ben Johnson ben at indietorrent.org
Fri Nov 4 02:07:41 UTC 2016


Hello!

I had hoped that marking all messages that arrive to a specific mailbox
as read/seen would be as simple as applying the following sieve script
to all incoming mail for that mailbox user:

########################
require ["imap4flags"];
addflag "\\Seen";
########################

With this script in-place, mail does not appear to be marked as
read/seen. It arrives as it normally would, and my email client sees it
as new mail.

Is something more required? Or is it a bug/limitation in my email client?

I've found many examples of "addflag "\\Seen";" on the web, but all of
them are wrapped in conditional logic of some variety. This is a
spam-training mailbox and I simply want everything marked as seen/read
upon arrival so I'm not bothered/notified every time.

Thanks for any pointers here!

-Ben


More information about the dovecot mailing list