12 September 2006

Panic: Temporary File Seek

Administrating users emails is a bore. Some are packrats and just keep their emails forever. A quick look at the /var/spool/mail/ directory will show just how much emails are stored.

Yesterday there was a user who sent out an email with a large 17MB power point file to EVERYONE. Three times. This caused uptimes to soar and made people frustrated that their emails were delivered slow if at all. So we had to clean them up.

# mail -u lewser.
fseek: Invalid argument
panic: temporary file seek
Aborted
# |

What? we started panicking. File system corruption? Our RAID failed? Need a reboot? Mailbox dead? We tried it on other users with large mailboxes with the same error!

***panic*panic*panic***

We decided to take a breather and do some research before we rip apart our mailserver.
Googling gave us a hint: use mutt.

#mutt -f lewser

and I was pleasantly surprised with a console app that looked like this:

spam riddled email user.

It successfully opened the mail, allowed me to navigate to the bottom really quickly (PgDn), and interactively delete the email (d), feedbacked to me whenever it was opening or closing a file. No silly fseek problems. What a life-saver.

So why doesnt mail support large mailboxes? I have no idea.
Why doesnt it provide a more 'soothing' error message instead of sending us into panic mode? I dont know.
Will I use 'mail -u' ever again? Not if I can help it.

The Mutt is truly Man's Best Friend.


yk.