[prev in list] [next in list] [prev in thread] [next in thread] 

List:       twig
Subject:    Re: [twig] horrifying INBOX deletion problem
From:       "Craig Foster" <craig () wiw ! org>
Date:       2001-08-29 2:08:11
[Download RAW message or body]

The only place where folders are ever deleted is 
features/mail/mail.folders.inc.php3.  It calls the TWIGMailDeleteFolder() 
function, which is defined in lib/mail/php-imap.inc.php3.  That function is 
just a wrapper for the imap_deletemailbox() PHP function, though, so there is 
little of interest to you there.

I am not saying that it is impossible that the problem is TWIG, but I do know 
that TWIG has been in production environments using Cyrus since at least 
around mid-1999, and there have been no reports of these types of problems.  
Are you sure that your little hack to change Cyrus's mailbox naming scheme 
isn't flawed.  (Obviously, a misplaced or missing "/" could cause a lot of 
problems within the directory structure of the server.)  Besides, RFC2060 
says that any attempt to delete the INBOX should generate an error, so that 
would mean that any IMAP server that would actually delete the INBOX would 
not conform to the IMAP protocol specifications.

Good luck figuring this out!  You may want to keep the IMAP RFC (RFC2060) 
handy as you scour both TWIG's and Cyrus' code.  If you can test TWIG against 
an unpatched Cyrus server, that would be ideal, but I know that is easier 
said than done.  It may also be helpful to see what happens with other IMAP 
clients, particularly other web IMAP clients, since web clients throw a lot 
more traffic at the server.

Let us know what you figure out!

-- 
Craig Foster
craig@wiw.org


Kyle Silfer <kyle.silfer@alibi.com> said:

> There is some deep, intermittent bug in my Twig configuration (Twig 
> 2.7.3 with Cyrus Imap patched to use "/" as folder separator) or perhaps 
> Twig itself that deletes the entire contents of a user's INBOX without 
> warning or ceremony. It has happened 6 times now to 4 different users.
> 
> At first I thought it was a problem with users choosing "bad" folder 
> names (e.g., with asterisks or high-ASCII), but that was a shoddy 
> diagnosis that proved false. Then I thought a glitch that allowed users to 
> rename their INBOX to "nil" was the source of the trouble. Not so--it was 
> definitely a problem, but a non-destructive one. The INBOX messages 
> were still there after the rename. A simple mailbox reconstruction 
> restored everything.
> 
> This very different and very real problem of total INBOX loss is somehow 
> related to moving messages and deleting folders. One of my users 
> experienced this TWICE in rapid succession. He made a new folder, 
> then moved the contents of an old folder to the new folder. Then he 
> deleted the old folder. The old folder was properly deleted, but then so 
> was every single message--plus IMAP index files--in his INBOX 
> directory.
> 
> Somehow Twig is issuing a "delete everything" command (under certain 
> circumstances) that is wiping out not only the subfolder of 
> user/joe.user/old folder but ALSO user/joe.user, the parent folder (e.g. 
> INBOX). Needless to say, this is a problem of drastic proportions and I 
> have got to find out the source of it.
> 
> I know that Twig is set up to interface with a variety of IMAP systems. 
> This is clearly a problem of the nexus between Twig and Cyrus Imap, 
> perhaps compounded by the "/" patch. What I want to know is: where 
> should I start looking? Where is the code that Twig uses to delete 
> folders? Where could an errant wildcard end up wiping out parent and 
> child folders in a single blow? This is the kind of bug that gives me 
> nightmares. Is there any way to disable the ability of Twig to EVER 
> delete the INBOX? A simple hack to prevent the accidental or intentional 
> deletion of the main box that no one would ever want to delete anyway?
> 
> The victims of this problem are savvy users who know how to manage 
> their mail. They have been bitten hard by a very nasty bug. We are 
> backing up the mail, but one could easily lose many important email 
> messages between backups. Even more maddening, I have not been 
> able to replicate the problem. It's highly intermittent, but a highly 
> intermittent A-bomb explosion in one's INBOX is a huge problem. Where 
> should I begin?
> 
> ./k
> 
> 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic