Compacting mailboxes...

Aleksandar Milivojevic amilivojevic at pbl.ca
Fri Feb 25 09:34:22 EST 2005


Forrest Aldrich wrote:
> We recently deployed Cyrus IMAPD on an internal corporate server.
> 
> We plan on using it for a larger installation (once I get comfortable 
> with all the technical quirks ;-))
> 
> In any case, an issue was brought up whereby if a user doesn't "Compact" 
> their mailbox (done via most common MUA's like Thunderbird) the deleted 
> messages can linger - for however long.
> 
> I've personally seen this before.
> 
> I'm concerned about disk space consumption of these messages in-limbo.   
> Is there some mechanism that can force a "compact" of the mailbox to 
> remove these deleted messages - or is there another method to manage 
> this scenario?

This is the way IMAP works.  Nothing specific to Cyrus.  You first mark 
message for deletition, then you perform expunge on mailbox which will 
delete all mails that are marked for deletition.  This makes easy for 
user to "undelete" mails as needed.  What some email clients call 
"compact mailbox", really means "expunge" in IMAP terminology.

Most email clients have option "expunge on exit" (or compact on exit, 
depending on what terminology is used).  This has effect of expunging 
the mailbox when it is closed.

It wouldn't be practical to force periodic "administrative expunge". 
Expunge works on mailbox level, so you might end up deleting emails that 
users just marked as deleted couple of seconds ago.  Although, it would 
be nice to have option to automatically remove emails after they have 
been marked for deletition for xyz days...

If you are concerned with disk space, enforce quotas and educate your 
users.  However, normal emails usually don't eat that much disk space. 
I have archives of several high traffic mailing lists under my mailbox, 
and I'm still well bellow Google's quota of 1GB.  I have individual 
files in my home directory that are much larger than that.  If I never 
deleted any emails (and got rid of mailing lists archives) I would 
probably be well under 100MB.  Point: disk space is cheap, don't worry 
too much about it unless you'll have thousands of users (and even if 
you'll have thousands of users, disk space is still cheap enough).

Note that using "Trash-like" folder on IMAP server is not good idea.  It 
may lead to even more disk space wasted.  Make sure your users have it 
disabled in Thunderbird and use more IMAP friendly behaviour of marking 
messages as deleted.  There's third option for deleting mail in 
Thunderbird that says "remove it immediately".  Never tested it, but I 
guess it does expunge after every delete action.  Not good thing to do 
(if you delete email by error, it's lost).

-- 
Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list