Email Disaster

Evolution is running like molasses, chewing up CPU, apparently because it’s choking on half a million emails in my “Junk” folder. And I can’t clean them out because, you know, half a million messages in my Junk folder. I’ve tried loading the folder into a browser tab in roundcube, but it can’t open it either. Any ideas how to go in on the server directly and clean things up there? vi would be a nightmare.

6 thoughts on “Email Disaster”

  1. What’s your mail server’s protocol? IMAP, POP, or something else? It would be pretty easy to write a script to do nothing but delete half a million emails out of a POP3 mailbox.

    How did you wind up with half a million junk emails?

  2. What mail format are you using? Mailbox? Or Maildir? If Maildir, each message is a separate file, and you should be able to move them (or move the Junk folder, then recreate it), then examine them with Bash or Python.

  3. There are mail filter programs you know guys… like maildrop and Sieve. Those would probably be more efficient to process large amounts of mail assuming you can use them on your mail server and easier to use than coding your own processing script.

  4. There’s a command-line tool called ‘split’ that splits a text file into x-line chunks for a specified value of ‘x’

    The outputs are named ‘oldfileaa’, ‘oldfileab’, and so on.

    In theory, you could rename ‘junkaa’ to ‘junk’, clean it up in Evolution, then exit, append ‘junkab’ and repeat.

    Problem might be that Evolution seems to have ‘index files’ of some kind and might object to the mismatch.

Comments are closed.