Web Hosting Talk







View Full Version : Huge files in /home/spool/mail (RAQ 2)


daddio
02-21-2006, 03:17 AM
I have some huge files in /home/spool/mail (on a RAQ2). These are predominantly user email files which periodically clear out as users check their mail. But sometimes they don't (I've also discovered that these boxes don't clear out if you have both forwarding and autresponder set in the GUI . . . go figure).


Anyway, I learned some time back how I can "clear out" such files (without removing them) by doing this:


cat /dev/null > filename


The way I understand it, this empties the file without breaking the pipe. And, so far, this has worked fine with files that I know I can empty safely.


My problem is that the two largest files in there (one is 800 MB!) are named "admin" and "adm".


In other words, I'm scared. :-)


What I want to know is if it is safe to cat /dev/null these files as well, or if doing so will cause some inherent system problems that I'm just unaware of. I suspect that they are just filled with old email messages also (like maybe every message that ever came into the server). But due to my ignorance, I feel like I should be particularly careful. Any guidance on this would be greatly appreciated. Thanks.


Fred

BruceT
02-21-2006, 12:46 PM
No, mail spool files are just that - mail. You can overwrite them with impunity... I would set up a .forward file in your admin user directory (/home/sites/home/users/admin I think) to forward that mail to an account that you check. Active Monitor sends all the alerts to admin, and if the spool file is that large, there might be some messages in there that you should be seeing!

Alternatively, at least for the admin user (I'm not sure what adm is - a user on one of your virtual sites?), you can log in as admin and use the pine mail client to read/delete your messages via an SSH or telnet session.

daddio
02-22-2006, 02:21 AM
Thanks, Bruce! I feel much better.

Don't know how to set up the .forward thing, but I'm thinking I could also just set up my email client to check it directly. In any event, I would want to wait on that until AFTER I've /dev/nulled the file; the last thing I need to do is actually download and read 800 MB of email! :-)

Thanks again.

Fred