Quote:
Originally Posted by uxbod This may help Code: su - zimbra
zmmailbox -z -m user@domain.com search -l 1000000 "in:/Sent (after:03/23/10) (before:03/26/10)" | awk '{ if (NR>4) { print $2; } }' Just change the date range to what you require. That will create a list of message ID's. Once you have that for each of those you can execute Code: su - zimbra
zmmailbox -z -m user@domain.com dm <message_ID> Just remember to take a backup of the account first! |
Thank you very much! I get a very long list of message ID's, with about 990 items. It kinda looks like this:
-142312
142279
-142275
142240
-142236
-142233
142200
-142196
-142193
142162
-142158
142122
-142115
142083
-142079
When I copy one of these message ID's to the zmmailbox command to delete these messages, the total number of items in the send item box decreases with one. I would expect this number to decrease much faster, but it only deletes one message. Is this supposed to happen?
Another thing I noticed is that I can only delete messages with a - in front of the message ID. When I delete one without a dash in front of the message ID, I get this:
zimbra@mail:/home/username$ zmmailbox -z -m
user@domain.com dm 142162
ERROR: mail.NO_SUCH_MSG (no such message: 142162)