Operating System - HP-UX
1833875 Members
1812 Online
110063 Solutions
New Discussion

Cleaning up root's mailbox

 
SOLVED
Go to solution
MAD_2
Super Advisor

Cleaning up root's mailbox

Anyone can tell me the correct way to clean up saved messages of root's mailbox (messages that were already read but are now stored in mbox). Also, where do I specify where the mbox can be placed, currently ours is right under "/" and I want to move it to a different location, to a filesystem where we have more space.

Thanks,
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
6 REPLIES 6
Volker Borowski
Honored Contributor

Re: Cleaning up root's mailbox

Hello,

did you try to use "elm" as a starter ?
It is menu driven and a lot more comfortable than "mail".

Hope this helps
Volker
MAD_2
Super Advisor

Re: Cleaning up root's mailbox

What I want to do is actually to remove saved messages in the "mbox", not read current mail. The mbox is right now stored under "/" and has messages that date to a few months ago, I want to do some cleanup of this mbox. I am not sure if I can simply us vi to delete the messages; I am certain there must be a way to get back to these to remove them by some kind of category (like from this date to that date, or those with subject line of... etc.)
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
Volker Borowski
Honored Contributor
Solution

Re: Cleaning up root's mailbox

Hi again,

http://www-finmath.uchicago.edu/Resources/mathlab_help/mail.html

What about the "-f" option ?
Volker
Frank Slootweg
Honored Contributor

Re: Cleaning up root's mailbox

It looks like you are using mail(1) as you mail client. I advise to (at least) use mailx(1). mailx allows you to specify the location of your mbox. See the MBOX environment variable. Note that this, despite what the term implies, is a mailx *internal* variable, set in your .mailrc file.
Santosh Nair_1
Honored Contributor

Re: Cleaning up root's mailbox

As far as I know, you can move the mbox file anywhere, its self contained. And as already mentioned, you can use the -f option to specify the file that you want to read from and if you're using mailx, then the location of the mbox file can be specified in the MBOX environment variable.

-Santosh
Life is what's happening while you're busy making other plans
Darrell Allen
Honored Contributor

Re: Cleaning up root's mailbox

Hi,

As others indicate:

mailx -f /mbox

man mailx for more info.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)