Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-29-2007, 06:40 PM   #1
Senior Member
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Rep: Reputation: 213Reputation: 213Reputation: 213
Can an user flush ones /var/mail/user ?


Since the /var/mail/user can be limited. sendmail -q -v can only be done by root.

Can an user do it for himself, to flush ?

That cannot be advised maybe ...
I am not expert in that

thank you

Last edited by Xeratul; 05-29-2007 at 06:47 PM.
Old 05-29-2007, 08:07 PM   #2
Senior Member
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, OpenBSD, Slackware, Solaris, SuSE, Xubuntu
Posts: 1,757

Rep: Reputation: 80
Can an user do it for himself, to flush ?
Not unless the sendmail binary is setuid for elavated priviledges, which you don't really want to do. Other MTA's might allow for user mail flush, but I don't know.

Most distros that use sendmail have a flag/option set to queue (flush) the mail spool directories on a regular basis like 30 minutes, example -q30m. List your processes and check sendmail:
# ps axe | grep sendmail
... Queue runner@00:30:00 for /var/spool/clientmqueue
The output will look similar to this if sendmail daemon is running with a queue flag set, 00:30:00 means 30 minutes.

If you don't know already, you can manually check ( -bp ) and flush ( -q ) the mail spool:
# sendmail -bp
output shows either empty or messages
# sendmail -q
If you've got something stuck in the queue, then you'll probably have to do manual cleanup, but that's for another day.
Old 05-30-2007, 11:02 AM   #3
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
Originally Posted by Xeratul

Since the /var/mail/user can be limited. sendmail -q -v can only be done by root.

Can an user do it for himself, to flush ?
I'm a bit confused about what you mean. Do you mean deleting the file? Change it to contain 0 bytes? Or something else?

typically, /var/mail/user is owned by the user, hence he can modify it (i.e. make it 0 bytes). Just start your favorite e-mail program and delete all your mail.

Directory /var/mail is typically not writable by the user, hence, a user cannot delete the file. You'd need to be root to do that.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
read mail from /var/mail/user with thunderbird cccc Debian 4 09-11-2006 07:53 AM
spam_buttons move from /var/spool/mail/user to $HOME/mail/Junk paul_mat Linux - Software 0 05-25-2006 02:07 AM
Deleted /var/mail/user directory Maeltor *BSD 2 05-20-2006 02:03 PM
Mail going to /var/spool/mail/user and not to Thunderbird pracslipkerm Linux - Newbie 4 06-21-2005 05:58 AM
/var/mail/$USER katana Linux - General 1 08-03-2001 06:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration