LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-29-2007, 07:40 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: Debian Land
Posts: 1,666

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


Hello,

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 07:47 PM.
 
Old 05-29-2007, 09:07 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 80
Quote:
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.

http://en.wikipedia.org/wiki/Setuid

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:
Code:
# 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:
Code:
# 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, 12:02 PM   #3
kees-jan
Member
 
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
Quote:
Originally Posted by Xeratul
Hello,

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.

Groetjes,

Kees-Jan
 
  


Reply


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 08:53 AM
spam_buttons move from /var/spool/mail/user to $HOME/mail/Junk paul_mat Linux - Software 0 05-25-2006 03:07 AM
Deleted /var/mail/user directory Maeltor *BSD 2 05-20-2006 03:03 PM
Mail going to /var/spool/mail/user and not to Thunderbird pracslipkerm Linux - Newbie 4 06-21-2005 06:58 AM
/var/mail/$USER katana Linux - General 1 08-03-2001 07:54 AM


All times are GMT -5. The time now is 04:26 PM.

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