On Tue Mar 01 09:17:00 2011, ecocode wrote:
Show quoted text> This is probably just a feature request:
>
> By default IMAP COPY will not copy the custom message flags. Would it
> possible to create a new
> copy function in Mail::IMAPClient which would also copy the flags (by
> reading them first and
> then set them on the copied message)?
Certainly possible. With just a quick glance at RFC 3501 it seems that
a server *could* (perhaps should?) preserve flags on a COPY. Section
6.4.7 says:
... The flags and internal date of the message(s) SHOULD be
preserved, and the Recent flag SHOULD be set, in the copy.
Might be an IMAP server bug. Doing this on the client side would
obviously be slower too (the client doesn't need to fetch message(s)
details/flags to issue a COPY). Details on your environment?
The code in migrate() shows one way to get the flags and copy them
across. Essentially, it sounds like you want a customized migrate()
that deals with the local server only and uses copy instead of fetching
and appending a message. I'm not convinced there's a need yet for this
type of thing, but I'm willing to listen.