Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty/delete/remove my solaris mailbox

Status
Not open for further replies.

hcclnoodles

IS-IT--Management
Jun 3, 2004
123
GB
I have a user called user1 whose mailbox is so big (the user runs hundreds of cronjobs all generating mails) that when i launch the command 'mail' i get

mail: Too many letters, overflowing letters concatenated


and then it scrolls for ever and ever


I want to remove/empty/delete this mailbox, how do i do this

thanks and regards
Gary
 
If you remove /var/mail/user1 that will get rid of all outstanding mail but as soon as another mail is generated the file will be recreated.

Ray



Even a bad day at the races is better than a good day at the office.
 
You could try (assuming the default mail location is the one in use):
cp /dev/null /var/mail/user1

I hope that helps.

Mike
 
And if you want this done on a regular basis, add it as a cron job, perhaps triggered by the size of the file.
 
Does "user1" really need the output, if not, can they add the following to all their crons >/dev/null 2>&1
This should stop their mail


0 3 * * * logs/deleter.ksh >/dev/null 2>&1
0 2 * * * logs/zipper.ksh >/dev/null 2>&1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top