Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-2008, 05:46 AM
Active Member
 
Posts: 39
Default [SOLVED] How to delete mails

Hi

I want to test my new server with an mass email sender,

Is there any command to clean up and erase all the test messages for all the users, I have 650 users on this server and I dont want go checking and deleting them all by hand.

Thanks

PD. Sorry for my bad english
Reply With Quote
  #2 (permalink)  
Old 10-22-2008, 06:04 AM
Moderator
 
Posts: 1,554
Default

if all the accounts will just have e-mail in their inbox, then you could run a script that empties the inbox folder of every user using zmmailbox. a scrdipt of something like this (run as zimbra user)

disclaimer: the following code is untested, written off the top of my head, and is probably not the most efficient way to do things, it's just meant to give you an idea of how to do stuff

Code:
#!/bin/bash

for i in `zmprov gaa`
do
zmmailbox -z -m $i ef /Inbox
done
Reply With Quote
  #3 (permalink)  
Old 10-22-2008, 07:10 AM
Active Member
 
Posts: 39
Default

Thanks

It seems to work, but can you explane to me what exactly does this line do

for i in `zmprov gaa`
Reply With Quote
  #4 (permalink)  
Old 10-22-2008, 07:18 AM
Moderator
 
Posts: 1,554
Default

zmprov gaa gets is short for getAllAccounts. So it gets all the account names and sets $i to the next account name each time the loop processes. you are passing teh account name to zmmailbox to tell it which account to empty the inbox for
Reply With Quote
  #5 (permalink)  
Old 10-22-2008, 07:43 AM
Active Member
 
Posts: 39
Default

Thanks.

Just tested the server sending 5000 localmails.
The memory usage vent to 5 GB, and it took it like 15 min.
the strange ting is that 10 min after this test, the memory still not released, and still 5 gb while the server not in use.
Is this normal???
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.