The mail provider for $work uses IMail to provide POP3/IMAP/Webmail access to our mail boxes. Unfortunately, when it’s faced with an inbox of 5000 e-mails (a script burped), it doesn’t seem to remember that I asked it to delete them, and when I check mail 20 minutes later, I get the same 5000 again. IMail’s web interface is, in a word, horrible. No toggle all, no search, nothing really useful.

So I pulled out the Squirrelmail gun, and pointed it at the IMAP port of our mail server. Told Squirrelmail that the server was type ‘other’, and let it rip.

ERROR : Bad or malformed request.
Query: SORT (ARRIVAL) ISO-8859-1 ALL
Server responded: UID Invalid Syntax

Wonderful. Turn off all server side sorting capabilities and suddenly it likes me. Well, half likes me. The sheer quantity of mail seems to upset the PHP script limits, so I tried cranking the script limits to 150 seconds runtime (default is 30). Still didn’t work.

Ended up creating another IMAP account in KMail and deleting from there. 5 minutes later, when I tried retrieving mail via POP3, all 5000 wanted to download again! Blasted IMail. 20 minutes later life was good – 15 messages to download.