One of my client's web hosting accounts ran out of disk space this week. It seems that the worm that has been going around was targeting one of his email user accounts. This particular user account was accumulating copies of the worm at the rate of several megabytes every five minutes. We decided to delete all email sent to this particular address as soon as it was received at the server. Here's how: Using a terminal session, navigate to the directory where the user's INBOX is stored. In our case, it was ~/users/username/mail/ . Type the following: (Warning: this deletes all the email in the user's inbox, so make sure there is not anything there you want to keep.) rm INBOX ln -s /dev/null INBOX (You have to execute the second command very quickly after the first one so that a new INBOX file is not created before you can can create a symbolic link to /dev/null) These two commands delete the existing INBOX for the user, and then create a symbolic link for INBOX pointing to /dev/null, which is equivalent to sending all the mail intended for that user directly to the trash (except that there is no "undelete" function for /dev/null). Anything that is sent there never comes back. Think of it as a black hole in your machine. That's all there is to it.
Posted by Scott Girard on 8/28/03; 2:07:22 PM
from the dept.
|