- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: User mailbox cleanup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 06:37 AM
тАО05-03-2004 06:37 AM
User mailbox cleanup
We run reporting application when sends multiple emails out to the users. This user mail box under /var/mail is 26 MB and filling up slowly. Any harm in cleaning up the file? How to clean it? Why it is getting filled up? This user runs multiple cron and at jobs. If system coudn't send mail out will it store in mail box?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 06:40 AM
тАО05-03-2004 06:40 AM
Re: User mailbox cleanup
Go to /var/mail,
do a "cat > user_name"
Till will make the file user_name "0" bytes.
It is done.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 06:48 AM
тАО05-03-2004 06:48 AM
Re: User mailbox cleanup
Cron by default will send the stdout and stderr from the crontab jobs to the user mail box, if they are not redirected.
If you dont want the user to receive mails from cron, you can edit the crontab and add the following entry at the end of the job.
1>/dev/null 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 06:49 AM
тАО05-03-2004 06:49 AM
Re: User mailbox cleanup
The system will attempt to send email as long aas there is space. If there is no space in /var, email will terminate, both incoming and outgoing. 26megs in .var is far too small for a normal system. It doesn't matter whether email or a series of print jobs fill /var, your system will be crippled once /var fills up.
As mentioned, you can simply zero out the email file for this user but of course, that deletes all email, not just cron and at.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 07:44 AM
тАО05-03-2004 07:44 AM
Re: User mailbox cleanup
I dont beleive so - cron sends out the mail if the stdout/stderr of the job is not redirected.
$ whoami
swamins1
$ crontab -l
* * * * * /usr/bin/ls /root
$ ls -lrt /var/mail/swamins1
-rw-rw---- 1 swamins1 mail 1008 May 3 12:44 /var/mail/swamins1
$ more /var/mail/swamins1
..
..
1
2
Flows-1.eps
PHCO_25841
PHCO_25841.depot
PHCO_25841.text
PHKL_26269
PHKL_26269.depot
PHKL_26269.text
PHKL_28025
PHKL_28025.depot
PHKL_28025.text
README_hp-ux
...
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/usr/bin/ls /root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 08:25 AM
тАО05-03-2004 08:25 AM
Re: User mailbox cleanup
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2004 10:45 AM
тАО05-03-2004 10:45 AM
Re: User mailbox cleanup
1. move the file "away" i.e.:
mv /var/mail/user /tmp/user.mail
2. wait a few minutes up to a few days
new incomings mails will recreate the file
3. execute
elm -f /var/mail/user
Thats a Menu-based program, where you can easily read the emails stored in /var/mail/user.
man elm for more info.
Read the mails. I guess they might be created by a cron job. Thats noted in the email text of each mail at the end. There you see the name of the cronjob and you can investigate that job not to create these mails......
hope this helps
Juergen