Time for 2.3.13?
Thomas Jarosch
thomas.jarosch at intra2net.com
Thu Sep 11 11:16:25 EDT 2008
Hi Bron,
On Thursday, 11. September 2008 03:33:15 you wrote:
> Can you post the logic that your script was using? That might help.
The problem is triggered by a perl script that syncs a list of users
against the actual user list in cyrus. It uses perl-IMAP-Admin to do this.
Unknown users get deleted from cyrus by recursivly deleting
the folders via $imap->delete($folder) starting at the lowest folder.
After that the user gets deleted from sasldb. Here's the relevant code:
------------------------------------------
# Count number of "/" in a string.
sub pntcnt
{
my($s)=@_;
$n=0;
for ($i=0; $i<length($s); $i++)
{
if (substr($s,$i,1) eq "/")
{
$n++;
}
}
return $n;
}
# $x is something like "user/jhope"
# delete subfolders
@sublist = $imap->list($x . "/*");
foreach $s (reverse sort { pntcnt($a) cmp pntcnt($b) } @sublist)
{
$imap->set_acl($s,$admin_name,"lrswipdca");
$err=$imap->delete($s);
if ($err)
{
print("error: $imap->{'Error'}\n");
}
}
# delete inbox
$imap->set_acl($x,$admin_name,"lrswipdca");
$err=$imap->delete($x);
if ($err)
{
print("error: $imap->{'Error'}\n");
}
# delete from sasldb
------------------------------------------
I've noticed there is a "delayed delete" feature in imapd. I don't know
the exact details about this feature, but if it delays the delete request
until the connection is closed, that might be the vunerable point
for a timeout as I was deleting multiple GBs of mail.
The script doesn't do anything magic besides calling
$imap->delete and $imap->close.
> Doesn't look like a skiplist issue directly to me. Possibly it's a
> "was in a transaction and rolled back" issue, but that's separate,
> and it doesn't explain the mails still being on disk!
>
> Also - do you have split meta? I.e. are the mail files in a different
> location than the cyrus.* files?
The meta data is in the same folder as the mails.
Any idea what might be going on?
Thanks,
Thomas
More information about the Cyrus-devel
mailing list