Bret Martin
2013-Jan-30 18:52 UTC
[Dovecot] Marking messages read / retaining date with Sieve
I'm trying to mark several hundred thousand messages as read as they are delivered via dovecot-lda(1). (I'm importing some mail from another format for migration purposes.) I've been able to do this with Sieve, but it has the side effect that the messages' received and saved dates are set to the current date, and Apple Mail (at least) uses one of these to display the message date. Without the Sieve filter in place, the dates are retained based on the From_ line as I would like. Does anyone know of any way I can either - retain the date when delivering using Sieve? - systematically mark a specific set of messages as read *after* delivery instead, perhaps with doveadm(1)? (even marking *everything* read would work in this particular case. I couldn't find any way to set flags with doveadm) Thanks, --Bret
Ben Morrow
2013-Jan-30 23:56 UTC
[Dovecot] Marking messages read / retaining date with Sieve
At 1PM -0500 on 30/01/13 you (Bret Martin) wrote:> I'm trying to mark several hundred thousand messages as read as they > are delivered via dovecot-lda(1). (I'm importing some mail from > another format for migration purposes.) > > I've been able to do this with Sieve, but it has the side effect that > the messages' received and saved dates are set to the current date, > and Apple Mail (at least) uses one of these to display the message > date. Without the Sieve filter in place, the dates are retained based > on the From_ line as I would like. > > Does anyone know of any way I can either > > - retain the date when delivering using Sieve? > > - systematically mark a specific set of messages as read *after* > delivery instead, perhaps with doveadm(1)? (even marking *everything* > read would work in this particular case. I couldn't find any way to > set flags with doveadm)I would do this by scripting IMAP access. Perl's Mail::IMAPClient has explicit support for running dovecot/imap in preauth mode, so you don't even have to authenticate. Of course, you need a Dovecot user account with access to all the relevant messages. Ben