Thursday, September 19, 2024

Too many messages for Outlook Express

Read the Disclaimer

Recently one of my Mitel SME Server clients took two weeks off. When he returned, Outlook Express told him he had 23,000 messages waiting on the server! Unfortunately, Outlook Express couldn’t bring any of those messages to his PC; it just hung.

It’s not unusual for Outlook Express to have problems like that. For example, if you don’t delete messages from your Inbox AND purge deleted messages, you will eventually reach the point where Outlook can’t bring in any messages at all. I don’t know for sure how Outlook Express works, but it sure looks like it trys to bring everything into memory before it writes anything to disk. That this is incredibly naive doesn’t need to be expanded upon. Anywhere, there we were, dead in the water. I tried having him change to IMAP from POP, but the same thing happened: Outlook Express just could not bring down the messages.

So, I ssh’ed into the machine and performed the following:

-==-

It would have been preferable to do this in single user mode, but I wasn’t able to be there physically. I suppose we have a small possibility of an error delivering mail in the brief period that the mailbox does not exist, and I could have (and perhaps should have) stopped the qmail server before doing this. However, if some process was actively delivering mail it would have just ended up in newx (because “newx” would retain “new”‘s inum) and the worst that could happen is that a message or two would bounce. As I said, better to do this single user, but this was probably OK.

Why move this like this? Two reasons: first, “new” had become unreasonably large, which would slow down both deliveries and pickups in the future – creating a new directory puts it back to reasonable size. Second, any new mail arriving after this would be easily picked up by Outlook Express because it would end up in “new”, not “newx”.

Now the problem was to move the messages back in, but slowly so that he would have time to delete the junk and file off the rest. The following script did the job:

-==-

I ran this as “nohup movejpg &” so that I could log out after starting it. This will transfer 30 messages a minute back to “new”, which should be slow enough for him to keep up. Of course this will take more than 10 hours to complete! I felt that was probably OK – some of the messages would transfer after hours, but that should be a small enough number that Outlook wouldn’t choke the next day. And of course if it is – we’ll just do it again!

It might have been impossible to do the “for i in *” if there had been tooo many more messages; in that case “xargs” would have let me control the scripts.

Reprint and Copyright Info

A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles