Date: Tue, 25 Sep 2012 06:52:24 -0400
Subject: Fwd: RE: /var/spool/mail ?
---------- Forwarded message ----------
From: "Wolf Halton" <firstname.lastname@example.org>
Date: Sep 25, 2012 6:50 AM
Subject: RE: /var/spool/mail ?
To: "Hadi Motamedi" <email@example.com>, <firstname.lastname@example.org>
# echo "" > /var/spool/mail/root
will replace the content of the file with an empty string,* however you might want to see what has been accumulating there.
Usually you get system events notifications. You might or might not care about those. My servers send crontab results notifications and I like to periodically audit those to make sure they are working.
To automatically purge the root mail file, you could just add a crontab line for root of the above command preceeded by
0 0 1 * *
that purges the file once per month.* It is a little like pasting a happyface sticker over your car's oil pressure readout, so I would suggest not doing it that way, but instead going in and find the issues behind the symptom of "full root mailbox."
On Sep 25, 2012 6:25 AM, "Hadi Motamedi" <email@example.com> wrote:
> Date: Tue, 25 Sep 2012 11:13:38 +0100
> From: firstname.lastname@example.org
> To: email@example.com
> Subject: Re: /var/spool/mail ?
> On Tue, Sep 25, 2012 at 10:47:44AM +0100, Hadi Motamedi wrote:
> > Dear All
> > On my server , the /var/spool/mail/root is getting very big in size. To free up
> > more space, can you please let me know how can I solve the problem ?
> Sounds like you have lots of mail accumulated in root's mailbox...
> Do you read and delete the mail that is sent to root?
> Karl E. Jorgensen
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org
> Archive: http://lists.debian.org/20120925101338.GD18682@hawking
you for your reply. Can you please let me know how can I delete them automatically or preventing from accumulating huge amount of mails there ?
Thank you very much for your help.