Remove "draft" Flag from message?

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
whaslbeck
Posts: 12
Joined: Sat Sep 13, 2014 2:43 am

Remove "draft" Flag from message?

Post 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
whaslbeck
Posts: 12
Joined: Sat Sep 13, 2014 2:43 am

Remove "draft" Flag from message?

Post 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.
jeffercaramori
Posts: 1
Joined: Tue Aug 21, 2018 1:51 pm

Re: Remove "draft" Flag from message?

Post by jeffercaramori »

Hello whaslbeck

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