Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My box (fc3) has sendmail (v8.x) installed and configured. My issue is that root gets about 405983495083 messages a day and his mailbox yields >100mb a week. It's now nearing a gig and I was wondering if it were possible to set up a cron to delete all his messages.
Now, I've gone into /var/spool/mail/ and replaced the mailbox file with a blank file - but that makes the mailbox not accessible from pine (not sure if it works still or not but it doesn't matter as I can't read those messages). Is there a command that I'm not aware of that can replace mailboxes with blank mailboxes?
Please feel free to give an alternate solution to the one I'm asking for as I'm not necessarily married to that idea.
Thanks for your quick reply - but this appears to have only opened up new issues. I'm pretty sure that my mailbox is just too big. It's currently at ~700mb.
[root@db mcupples]# mail
d *Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/root": 139232 messages 38639 new 139214 unread
fseek: Invalid argument
panic: temporary file seek
Segmentation fault
[root@db mcupples]#
The panic just worries me. I'm going to go google this and hopefully find something. Let me know if you think of anything first.
If you simply rename the file to something else, will pine bomb out after that? It would basically be like deleting the file. When it needs to put another email in the file it will just recreate the file...
I guess I just did it wrong yesterday. Strange. It works when I just "mv root rootytooty", just re-creates the root file. I guess I can delete rootytooty now.
As soon as I deleted it I had five new messages about mail failures. I think I've got to install that check root kit or something.
I would check to make sure you didn't accidentally setup an open relay. Maybe a node inside your network has a virus and is using your server as it's relay......
Checking for a rootkit is not a bad idea either.
/var/log/maillog might help to find the origination point of these emails....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.