[Dovecot] How to set MDNSent flag on a large amount of mails?
tss at iki.fi
Tue Jun 3 19:37:50 EEST 2008
On Wed, 2008-06-04 at 00:33 +0800, Patrick Nagel wrote:
> after having moved a big mail archive to IMAP, I've now got the following
> problem: The MUA asks to send an MDN on all those old messages that contain
> the 'Disposition-Notification-To' header when opened. I'd like to set the
> $MDNSent flag on those (>10000 in a deeply nested directory structure)
> Do I really need to write a script that evaluates each dovecot-keywords
> file, figures out which letter corresponds to the flag and rename the files
> (per directory) accordingly? Isn't there a more simple way?
How about making your script use IMAP protocol?
1 list "" *
2 select <each mailbox>
3 uid search header Disposition-Notification-To ""
4 uid store <search result as msgset> +flags $MDNSent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080603/50619172/attachment.bin
More information about the dovecot