LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   server commands to clear mail (https://www.linuxquestions.org/questions/linux-newbie-8/server-commands-to-clear-mail-868363/)

magicman 03-13-2011 05:52 PM

server commands to clear mail
 
My var partition is full. The main culprit is NOW the mail file. What is the command to empty the mail files? The mqueue and clientmqueue files are now low on usage but the mail file is responsible for filling up the var partition.

Magicman

repo 03-13-2011 06:42 PM

Welcome to LQ

Are you using sendmail?

Code:

sendmail -v -q
That will attempt to clear the queue and tell you why the mail is not moving.
If you don't care about the mail messages.


Code:

stop sendmail
rm -f /var/spool/mqueue/*
start sendmail

However, you should investigate why mqueue is filling up.


Kind regards


All times are GMT -5. The time now is 12:35 PM.