Mailbox Cleaner

Ever get this annoying message from Thunderbird? (Or some other mail client; the problem is on the server side.)
The current command did not succeed. The mail server responded: The requested message could not be converted to an RFC-822 compatible format..
This probably means "You are using Thunderbird with an Exchange Server, and Exchange can't digest its own dog food. You are probably missing a meeting right now, because usually this happens when you get an important calendar update."

I wrote a tool that finds the problematic message(s) and moves them into a "Trouble" folder. You'll still miss the meeting, but at least you won't get the annoying popup.

If you are on Linux: save clean-mail.pl as a text file, then run perl on it. Don't worry; it won't do anything before asking you. If you are on Windows, see below.

Command-line options (none are necessary, but you'll probably want -s at least):

For Windows, try this: clean-mail.exe. Warning: it takes a while to start up. Use it by running:

clean-mail.exe -s mail-server-name

It will prompt for the mail login and password. By default, it will try to move "bad" messages into a subfolder of your inbox called "Trouble". Change the folder name with:

clean-mail.exe -s mail-server-name -T foldername

(the default setting is Inbox/Trouble)

NOTICE: Unfortunately, the Windows version currently has a bug where you cannot set the server name! It will say "failed to connect to mail server '1'." I will try to fix this soon, but my Windows machine is currently out of commission and will be until either I hack into it or the IT folks get around to finishing up what they were doing that broke it in the first place.

Please let me know if it worked for you. I am sph1nk@gmail.com, except the 1 is an i.

I also just found out about someone else's tool that does pretty much the same thing. His came first, I think, but I didn't find it when I was searching for a solution to this problem.


clean-mail.pl info page - Steve Fink - 2009-Oct-27