| 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.
|  | | 
02-18-2009, 02:17 PM
| | | Disk space - mail store question. Hi,
I am running Zimbra 5 and have a question about disk space and the message store. I noticed I was getting low on disk space and looked around, most of my space is being used by /opt/zimbra/store.
I spot checked some accounts (they are used to pass info, so they all are identical mostly) and got an idea of how much each uses x total mailboxes and that number is samller then my store by a couple gigs.
I have 5.0.1 ( i think) and I noticed after install that the "e-mail message lifetime" wasn't working - found a forum that said it was a bug? and to use a script to purge my mailboxes.
I use this:
#!/bin/bash
#
#
zmprov gaa > /tmp/acccountsList.txt
for acct in `cat /tmp/acccountsList.txt` ; do
THEACCOUNT=$acct
THEDATE=$(date --date='3 days ago' +%m/%d/%y)
THEFOLDER="/Inbox"
# (before:$THEDATE)
touch /tmp/deleteOldMessagesList.txt
for i in `zmmailbox -z -m $THEACCOUNT search -l 1000 "in:$THEFOLDER (before:$THEDATE)" | grep conv | sed -e "s/^\s\s*//" | sed -e "s/\s\s*/ /g" | cut -d" " -f2`
do
if [[ $i =~ [-]{1} ]]
then
MESSAGEID=${i#-}
echo "deleteMessage $MESSAGEID" >> /tmp/deleteOldMessagesList.txt
else
echo "deleteConversation $i" >> /tmp/deleteOldMessagesList.txt
fi
done
zmmailbox -z -m $THEACCOUNT < /tmp/deleteOldMessagesList.txt >> /opt/process.log
rm -f /tmp/deleteOldMessagesList.txt
done
rm -f /tmp/acccountsList.txt
----------------------------------------------------------------------
My problem is disk space is going down and running this script clears the mail from the inboxes, but I find that the size of the store isn't going down. I am not getting any space back.
Is there some maintenance routine that has to run to purge deleted mails from the store once they are deleted from the mailbox? If so, when does it run and can i kick it off manually?
Thanks,
Bruce | 
02-20-2009, 06:18 AM
| | | I guess there is nothing obvious. | 
02-20-2009, 06:26 AM
| | | Quote: |
When you’re absolutely out of room on the disks housing your DB (seriously put in that purchase order for more storage - it’s cheap these days) in a pinch the optimizeMboxgroups.pl script (available in the public cache and added to the upcoming 5.0.10) can help you recover wasted space in your mail_item, appointment, imap_folder, imap_message, open_conversation, pop3_message, revision, and tombstone tables on each mboxgroup. Just note that it temporarily locks each table, and could use considerable IO while they’re being rebuilt. You can certainly use it pro-actively during a maintenance window to reclaim space as well.
| Admin Tools & Tidbits - Part 2 » Zimbra :: Blog
__________________ | 
02-20-2009, 06:32 AM
| | Zimbra Consultant & Moderator | |
Posts: 20,313
| | http://wiki.zimbra.com/index.php?title=Mailbox_Purge
I'd suggest you upgrade to the most recent release of Zimbra to get a fix for the bug that you're encountering.
__________________
Regards
Bill
| 
02-20-2009, 07:48 AM
| | | Thanks Bill. Is the latest release stable? No major bugs? | 
02-20-2009, 07:50 AM
| | | Works fine and dandy here 
__________________ | 
02-20-2009, 07:54 AM
| | | Thanks Uxbod - I've been unlucky with bugs last 2 years lol.
Quick question, do I need to find the upgrade doc again that has all the steps or does the installer handle everything now a days? What I mean is I recall in previous upgrades you had to put your postfix settings etc back and there were general things that were good to do.
I wasn't sure if thats still the case of not.
Appreciate the help,
Bruce | 
02-20-2009, 07:58 AM
| | Zimbra Consultant & Moderator | |
Posts: 20,313
| | That would depend what modifications you've made, the general rule being: if you've modified any config files then you'll need to do them again manually after the upgrade.
__________________
Regards
Bill
| 
02-20-2009, 08:09 AM
| | | Thanks Bill. The installer will upgrade all things Zimbra and GUI configs I've made. Any conf files etc I've touch I will have to redo. So I'll need to make sure the documentation on those is good before I upgrade.
Perfect.
Thanks,
Bruce | 
02-20-2009, 08:13 AM
| | Zimbra Consultant & Moderator | |
Posts: 20,313
| | Ah, you've also made change to the themes? If you've done that you'll also need to make them again. Sorry, I forgot to mention that.
__________________
Regards
Bill
| | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |