Cleaning up a big mailbox (the outlook way)
June 18th, 2009 | by admin |What happens when you leave unsuspecting active sendmails laying around, just to send logwatch report messages, for the same mail account, on linux servers, BUT for instance, with an unfinished DNS configuration (“oh..wasn’t a priority then”
) ?
Yup, 4-5 days of bounce mail in mail queues.
Worse, what happens when it finally becomes a priority and you correct it ?
Simple expression: 4 day-sized-queue * #servers = Mailbomb on the recipient’s account.
Problem: Selective deletion of large quantities of mail. Most webmail server software, like OWA or IMP, won’t do you any good, as their mail grouping capabilities are somewhat limited.
Solution: If your mail server supports the IMAP or MAPI protocol (an exchange mail server), you can use outlook, to group the messages efficiently, and therefore delete large groups of unwanted mail.
Bear in mind that MAPI not supported, neither in Outlook express, nor the Windows (Live) Mail embedded in the Vista OS. You’ll have to stick to the IMAP protocol in these situations, or use the enterprise versions of the mail client.
Of course, if we’re talking about a Unix environment, IMAP is the (hard) way. Through testing, I found IMAP quite stressful. In the IMAP protocol you have to first delete the messages and then purge the mailbox.
The delete step is easy and fast. Your mail agent just instructs the server to mark the messages as deleted. They’re not really gone. Just marked. You can safely undelete them.
It is the purge portion you have to worry about. This is when messages are actually erased, and you can’t undeleted them (unless of course, you have a backup). You have to worry about, not because it’s irreversible, but because this is when the imap protocol really does a large overhead of control messages between the User Agent (mail client) and the Transport Agent (mail server). On a large setup you’ll probably won’t succeed, in deleting everything you want, all at once.
In such scenario, please be patient and delete/purge smaller quantities of messages.
Anyway, do NOT use POP for this. It does NOT work that way. Besides embarrassing yourself (even more), you’ll cause a lot of stress on the network, mail server and the mail client. You probably end up crashing your client and deleting useful mail from the account. In these cases, POP on the account = nuke the account.
I tried, unsuccessfully, to do the same thing, a couple of weeks ago with thunderbird, using IMAP, but I’m sure there are clients out there, that can manage the IMAP/MAPI account’s mail list, as good as outlook does.
Theoretically, you can do this resorting to a program/script with a IP network API, that emulates the IMAP protocol on the client side and selectively deletes mail messages based on a relevant filter, but I don’t know any piece of software that already does that.
This procedure is also valid for an account the receives a lot a mail, even on normal operations.
