Deletion of accounts not freeing up filestore

paul.osborne at canterbury.ac.uk paul.osborne at canterbury.ac.uk
Tue Sep 20 04:36:55 EDT 2011


Hi,

I inherited an elderly version of cyrus (2.3.7-7) on Red Hat 5.5 - yes I
know it is an older version but the latest Red Hat package is (2.3.7-12)
and looking through RedHat's changelog - I don't believe that any
changes affect the issue that I am seeing at the moment.

For reasons unknown to me, deleting accounts appears to remove users
from any internal cyrus databases but not remove the files from the
filestore.

So for example:

# cyradm --user cyrus localhost
localhost.localdomain> info user/azo1
localhost.localdomain>

Which is what I would expect, but in the filestore:
bash-3.2$ ls -la | grep azo1
drwx------    5 cyrus mail   4096 Oct 19  2009 azo1

Shows that the mail store for the user has not actually been removed
from disk.

To delete the users we are pulling data out of a mysql database (that
manages accounts) and using perl and the use Cyrus::IMAP perl module to
hook into Cyrus.

The pertinent part of perl script to delete accounts is:

        # Setup ACL (permission)s for the cyrus user so that the account
can be removed.
        $cyrus->setaclmailbox($mailbox, $cyrus_user, "all" );
        if ($cyrus->error) {
                # Create a status file to update database with
status/code
                fail_with ("Error: Cannot set perms on $mailbox " .
$cyrus->error . "\n");
        }

        # If ACL is set, attempt to remove account
        $cyrus->deletemailbox($mailbox);
        if ($cyrus->error) {
                # Create a status file to update database with
status/code
                fail_with ("Error: Cannot delete $mailbox " .
$cyrus->error . "\n");
        }

And we are definitely not getting failure messages, so at this point I
am baffled and leaves me with the following questions:

1. Have I hit a version of Cyrus with a bug? 
2. Are we doing something wrong with the account deletion? 
3. Is there a cyrus process that I need to run in addition to clear out
the filestore (I cannot see anything in the documentation suggesting
that there is).
4. Can I manually remove the mailbox folders to free up disk which is
getting rather lower than I would like? 

Thoughts would be appreciated.

Many thanks

Paul

Paul Osborne
Systems Analyst
Infrastructure Group
Computing Services
Canterbury Christ Church University
Tel: 01227 782751




More information about the Info-cyrus mailing list