[Dovecot] 9GB of messages in /tmp
Hello,
Well, I have a brain-dead user (using Thunderbird 2.0.0.14) who just won't listen when I tell them not to try to move 5000+ messages at one time (or if deleting, bypass the Trash), and they managed to royally screw up their maildirs...
I have two problems...
- The /tmp directory has 9+GB in it... can I just rm tmp/* on that directory without making this problem worse?
and
- One of the directories they were moving now has 5 copies of a whole bunch of messages...
I'm very dangerous when it comes to command-line work beyond really basic stuff, and my scripting skills are less than inspiring...
Is there a relatively safe command-line way of finding all messages that have more than one instance, and deleting all but the last instance?
Tia...
--
Best regards,
Charles
Charles Marcus wrote:
Hello,
Well, I have a brain-dead user (using Thunderbird 2.0.0.14) who just won't listen when I tell them not to try to move 5000+ messages at one time (or if deleting, bypass the Trash), and they managed to royally screw up their maildirs... It's never bothered me - though I'm typically on a local IMAP connection. Is yours different?
I have two problems...
- The /tmp directory has 9+GB in it... can I just rm tmp/* on that directory without making this problem worse? That'll make 'em go away...shouldn't compromise anything, unless they moved good stuff they wanted to keep....
and
- One of the directories they were moving now has 5 copies of a whole bunch of messages...
I'm very dangerous when it comes to command-line work beyond really basic stuff, and my scripting skills are less than inspiring...
Is there a relatively safe command-line way of finding all messages that have more than one instance, and deleting all but the last instance? The only way to determine if the messages are the same would be to do a full-text comparison, per message. Not fun. Tell the user they get to enjoy processing their mail by hand - an object lesson in why they should listen to their sysadmin.
-- Daniel
On 6/12/2008, Daniel L. Miller (dmiller@amfes.com) wrote:
Well, I have a brain-dead user (using Thunderbird 2.0.0.14) who just won't listen when I tell them not to try to move 5000+ messages at one time (or if deleting, bypass the Trash), and they managed to royally screw up their maildirs...
It's never bothered me - though I'm typically on a local IMAP connection. Is yours different?
TBird will sometimes barf if you try to move thousands of messages, then *immediately* after the drag/drop, start doing other things with your email (checking new messages, deleting messages, etc), without giving it 5 or 10 seconds to finish what it is doing.
It is *much* worse about barfing with Courier than with dovecot though... hmmm... and I just realized, this user is still on Courier (we are slowly migrating all of them over - almost done, but not quite)... crap... so it wasn't dovecots fault, most likely...
The only way to determine if the messages are the same would be to do a full-text comparison, per message. Not fun. Tell the user they get to enjoy processing their mail by hand - an object lesson in why they should listen to their sysadmin.
Heh... she's been working on it for about half an hour... I just thought I'd see if I could save her some trouble. But no, I don't feel bad about it.
And the folder that ended up with 5 copies... had 27,000 messages in it, when it should have about 5,000.
--
Best regards,
Charles
On Thu, 2008-06-12 at 15:08 -0400, Charles Marcus wrote:
Hello,
Well, I have a brain-dead user (using Thunderbird 2.0.0.14) who just won't listen when I tell them not to try to move 5000+ messages at one time (or if deleting, bypass the Trash), and they managed to royally screw up their maildirs...
maildir_copy_with_hardlinks=yes should help a lot with this.
I have two problems...
- The /tmp directory has 9+GB in it... can I just rm tmp/* on that directory without making this problem worse?
Only part of Dovecot that writes to /tmp is deliver, and it keeps the files there probably less than a microsecond (create file + unlink immediately).
On 6/12/2008, Timo Sirainen (tss@iki.fi) wrote:
I have two problems...
- The /tmp directory has 9+GB in it... can I just rm tmp/* on that directory without making this problem worse?
Only part of Dovecot that writes to /tmp is deliver, and it keeps the files there probably less than a microsecond (create file + unlink immediately).
Hi Timo,
I realized after I posted that this user is still on courier-imap (this system is in the process of being migrated).
So I guess courier uses the /tmp folder when moving messages... I remember this happened on another system I was using once - and that was using courier too...
Guess I gotta get the rest of those users migrated asap...
--
Best regards,
Charles
Timo Sirainen wrote:
On Thu, 2008-06-12 at 15:08 -0400, Charles Marcus wrote:
Hello,
Well, I have a brain-dead user (using Thunderbird 2.0.0.14) who just won't listen when I tell them not to try to move 5000+ messages at one time (or if deleting, bypass the Trash), and they managed to royally screw up their maildirs...
maildir_copy_with_hardlinks=yes should help a lot with this.
I have two problems...
- The /tmp directory has 9+GB in it... can I just rm tmp/* on that directory without making this problem worse?
Only part of Dovecot that writes to /tmp is deliver, and it keeps the files there probably less than a microsecond (create file + unlink immediately).
Same situation with dovecot - I tired to delete ~ 120 000 messages form "catch-all-possible-spam" mailbox using Thunderbird. Filter out messages older than 7 days was successfully. Thunderbird failed to delete them (locked up)... i got salted imap process, locked dovecot-uidlist file (dovecot-uidlist.lock) in maildir with /tmp full of new spam... as it continue to arrive (frquncy is aubout 2-3 messages per sec, server hosts ~500 domains.). dovecot v 1.0.12
Uldis
On Fri, 2008-06-13 at 17:09 +0300, Uldis Pakuls wrote:
Same situation with dovecot - I tired to delete ~ 120 000 messages form "catch-all-possible-spam" mailbox using Thunderbird. Filter out messages older than 7 days was successfully. Thunderbird failed to delete them (locked up)... i got salted imap process, locked dovecot-uidlist file (dovecot-uidlist.lock) in maildir with /tmp full of new spam... as it continue to arrive (frquncy is aubout 2-3 messages per sec, server hosts ~500 domains.). dovecot v 1.0.12
I suppose you're using Dovecot deliver? v1.1's deliver no longer requires dovecot-uidlist.lock - if it exists it immediately just delivers the mail without updating dovecot-uidlist or indexes.
I guess 120k takes a while to copy in any case, but I hope you have maildir_copy_with_hardlinks=yes set? Then it shouldn't at least take forever. :)
participants (4)
-
Charles Marcus
-
Daniel L. Miller
-
Timo Sirainen
-
Uldis Pakuls