- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Big file /etc/mail/rootmail
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
Forums
Discussions
Discussions
Discussions
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
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
10-14-2004 01:46 PM
10-14-2004 01:46 PM
Big file /etc/mail/rootmail
I discovered that the particular file /etc/mail/rootmail is big 41MB.
-rw-rw---- 1 root mail 41828647 Oct 15 09:30 rootmail
I would like to housekeep it.
Query: Can I just perform #rm /etc/mail/rootmail to housekeep it?
Or other method?
Please advise me.
thanks/cliff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 01:51 PM
10-14-2004 01:51 PM
Re: Big file /etc/mail/rootmail
mail is stored in /var/mail/username file.
It would seem that this file may have been accidentially transferred to the /etc folder. Data files really do not belong there.
Knowing your version of sendmail and HP-UX would increase my confidence a wee bit.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 02:03 PM
10-14-2004 02:03 PM
Re: Big file /etc/mail/rootmail
HPUX 11.00
sendmail(1m) 8.9.3
Thanks guys.
regards/cliff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 02:51 PM
10-14-2004 02:51 PM
Re: Big file /etc/mail/rootmail
That changes everything.
That could be a valid mailfile and the date is current so its being used.
If a mail file gets really huge and I don't feel like actually reading the mail, I do this:
> /var/mail/root
Same thing would work for rootmail
As to why rootmail file is being used, thats probably due to your sendmail configuration, which is currently beyond the scope of this lecture.
Once you get rid of the file the data is gone. You may want to use elm as root (or rootmail) and read the mail first.
Why not rm?
Because the sendmail daemon is probably open and won't be happy if that file just disappears.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 03:03 PM
10-14-2004 03:03 PM
Re: Big file /etc/mail/rootmail
Before you delete it or null it out, you might want to look at it and see if it has any important information in it. It could be so large just because the mail has never been read, or it could be something is complaining by sending e-mail to root that isn't being seen.
You can also do a 'fuser rootmail' to see if any processes are holding it open. If so, you'll probably want to use SEP's suggestion to null it, as removing an open file doesn't make it go away or free up the space until the processes holding it open have completed.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 03:06 PM
10-14-2004 03:06 PM
Re: Big file /etc/mail/rootmail
[ROOT ctss212]var/mail # fuser rootmail
rootmail:
And nothing is holding onto rootmail it seem.
regards/cliff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 05:55 PM
10-14-2004 05:55 PM
Re: Big file /etc/mail/rootmail
start elm as user root. Just check the last mails for error messages, if there is nothing importand:
# cp /dev/null /var/mail/root
to create an ampty mail file for root.
Best regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:10 PM
10-14-2004 07:10 PM
Re: Big file /etc/mail/rootmail
I view the /var/mail/rootmail and realised that some application cronjob errors keep reporting error.
#mv /var/mail/rootmail /var/adm/crash
#touch /var/mail/rootmail
#chown root:mail /var/mail/rootmail
#chmod 660 /var/mail/rootmail
Above equivalent to cp /dev/null /var/mail/rootmail?
regards/cliff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:29 PM
10-14-2004 07:29 PM
Re: Big file /etc/mail/rootmail
Check the cronjobs for errors. You can use
# elm -f /var/adm/crash/rootmail
to read the old messages.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:34 PM
10-14-2004 07:34 PM
Re: Big file /etc/mail/rootmail
#mv /var/mail/rootmail /var/adm/crash
#touch /var/mail/rootmail
#chown root:mail /var/mail/rootmail
#chmod 660 /var/mail/rootmail
Above equivalent to cp /dev/null /var/mail/rootmail?
Which is preferred? Applicable to housekeeping of /var/adm/syslog/syslog.log as well?
regards/cliff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:43 PM
10-14-2004 07:43 PM
Re: Big file /etc/mail/rootmail
Attached here is a mail file size monitoring program, called "checkmailbox.sh". With a "-v" option it tells you each mail box on the system, how big it is, when the first message is for and how many messages are cron-related.
Run this to see how your mailbox is broken down.
[Another post follows]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:47 PM
10-14-2004 07:47 PM
Re: Big file /etc/mail/rootmail
If u want to be notified when I convert this script to include archiving and retention specified in days, not months, add your name to this thread and monitor it occasionally.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 07:47 PM
10-14-2004 07:47 PM
Re: Big file /etc/mail/rootmail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 12:42 AM
10-15-2004 12:42 AM
Re: Big file /etc/mail/rootmail
Ian - nice script(s), but what is in:
/operations/etc/mailmonitor.cfg
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 12:43 AM
10-15-2004 12:43 AM
Re: Big file /etc/mail/rootmail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 01:36 AM
10-15-2004 01:36 AM
Re: Big file /etc/mail/rootmail
about your interesting and useful script " cleanupmailbox.sh " .. it's not clear to me
I've created /operations/etc/mailtrim.cfg inserting ' root 2 ' for 2 months retention period ; but what i should insert in ' /operations/etc/monthnumbers ' file ?
Thanks
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 02:49 AM
10-15-2004 02:49 AM
Re: Big file /etc/mail/rootmail
bc02n0v0> cat /operations/etc/monthnumbers
1 Jan
2 Feb
3 Mar
4 Apr
5 May
6 Jun
7 Jul
8 Aug
9 Sep
10 Oct
11 Nov
12 Dec
13 Jan
14 Feb
15 Mar
16 Apr
17 May
18 Jun
19 Jul
20 Aug
21 Sep
22 Oct
23 Nov
24 Dec
This is designed this way to handle wrap-around of calender months and years. Sorry I omitted it, I will add its creation to the program.
NOTE: You can only to back 11 months this way, anything more than a year is not catered for.
The core of the trim program is 2 steps,...
Find the number of lines of emails before the current date
Send delete commands thru a pipe to "mailx"
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 03:03 AM
10-15-2004 03:03 AM
Re: Big file /etc/mail/rootmail
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2004 03:03 AM
10-15-2004 03:03 AM
Re: Big file /etc/mail/rootmail
Work now . Very good .
I'll look sometimes to this 3d for any
script improvment
Regards