Page 1 of 1

Remove "draft" Flag from message?

Posted: Wed Nov 07, 2012 10:56 am
by whaslbeck
Hello,
during our migration to zimbra (with imap) some mails where erroneously flaged as "draft". Now this mails can't be forwared or replyed (only edited, which is not what our users want).
So I have two problems to solve:
* find all messages that are tagged as draft (I can check this with for one mail with "echo "sm gm -v " | zmprov | grep isDraft", but are there better ways?)
* remove the draft flag from a message (can this be done with zmmailbox flagMessage?)
thanks for any hint,

Walter

Remove "draft" Flag from message?

Posted: Mon Nov 26, 2012 5:04 am
by whaslbeck
OK, fixed it by myself.
I created a small python script which connected to a zimbra user account via IMAP, iterated over all folders, selected all mails with Draft flag (imap.search (DRAFT)), fetched that mails, removed Draft from flags, appended the mail again and deleted the original mail.

Re: Remove "draft" Flag from message?

Posted: Tue Aug 21, 2018 1:56 pm
by jeffercaramori
Hello whaslbeck

I'm having the same problem, can you pass me the script you used?