Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   /var/spool/mail ? (http://www.linux-archive.org/debian-user/707196-var-spool-mail.html)

Denis Witt 09-25-2012 10:49 AM

/var/spool/mail ?
 
On Tue, 25 Sep 2012 10:19:06 +0000
Hadi Motamedi <motamedi24@hotmail.com> wrote:

> Thank 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 ?

Depending on your system configuration you can try this, put the
following line in your /etc/aliases:

root: /dev/null

Then save the file and run the command newaliases, from now on mails to
root should be saved in /dev/null.

But the better way is to read the mails (maybe they contain important
information) and delete them afterwards, you could forward the mails to
your own mailaccount using /etc/aliases, just replace /dev/null with
your Mail-address. (Of course the system needs the ability to send
E-Mails to this destination.)

Also you should check why root is getting so many Mails and disable the
cause, therefore you have to read the mails.

Best regards
Denis Witt


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120925124920.3e3ae663@X200

Hadi Motamedi 09-25-2012 10:58 AM

/var/spool/mail ?
 
Date: Tue, 25 Sep 2012 06:52:24 -0400
Subject: Fwd: RE: /var/spool/mail ?
From: wolf.halton@gmail.com
To: debian-user@lists.debian.org



Wolf Halton

http://sourcefreedom.com

Apache developer:

wolfhalton@apache.org

---------- Forwarded message ----------
From: "Wolf Halton" <wolf.halton@gmail.com>
Date: Sep 25, 2012 6:50 AM
Subject: RE: /var/spool/mail ?

To: "Hadi Motamedi" <motamedi24@hotmail.com>, <debian-user@list.debian.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."




Wolf Halton

http://sourcefreedom.com

Apache developer:

wolfhalton@apache.org

On Sep 25, 2012 6:25 AM, "Hadi Motamedi" <motamedi24@hotmail.com> wrote:








> Date: Tue, 25 Sep 2012 11:13:38 +0100
> From: karl.jorgensen@nice.com
> To: debian-user@lists.debian.org


> Subject: Re: /var/spool/mail ?
>
> Hi
>
> 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 listmaster@lists.debian.org
> Archive: http://lists.debian.org/20120925101338.GD18682@hawking


>

Thank
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.

Hadi Motamedi 09-25-2012 10:58 AM

/var/spool/mail ?
 
> Date: Tue, 25 Sep 2012 12:13:40 +0200
> From: h.reindl@thelounge.net
> To: centos@centos.org
> CC: motamedi24@hotmail.com
> Subject: Re: [CentOS] /var/spool/mail ?
>
>
>
> Am 25.09.2012 12:02, schrieb Hadi Motamedi:
> >
> > 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 my problem ?
> > Thank you
>
> these are system-mails (cronjobs, logwatch, smartd, mdadm.....)
> you should read them from the very beginning of the setup!
>
> /etc/aliases:
> root: your-mail-address@yourdomain.tld
>
> call the command "newaliases"
>
> call "postqueue -f" if postfix is used to deliver existing mails
> for sendmail -> no idea, i am postfix-user since many years
> ______________________
>
> you can also delete the mails before change the config to
> relay them in future and restart the MTA
>

Thank you very much for your help.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 07:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.