Is there any way to preserve \Recent, or am I out of luck?
Some people have reported that my script which shuffles around expired or oversized mail also causes their clients to report it as already read. I guess those clients check \Recent instead of \Seen when they download. I wish I knew which clients.
With Mail::IMAPClient I tried using move(), copy(), and migrate() but the result is the same-- once it looks at the source message, \Recent is gone. (I tried patching it where it greps out the \Recent flag before appending the messages, but that causes a silent error.)
Directly appending to the destination folder does not help either, since I would lose any flags set by the user, and if I tried to preserve those, then I would lose the \Recent flag when I read through the destination folder to figure out which messages were which.
RFC5301 says \Recent can never be set... but does its prohibition include the case of migrating mail, where the intent is to retain them intact? It would be nice if Dovecot offered a migration feature which would move a message from folder to folder without unsetting \Recent.
Mark