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) mails. .. 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