- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to delete mail messages
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
тАО01-06-2008 05:52 PM
тАО01-06-2008 05:52 PM
I have a large size of root mail in my HP-UX server.
I tried to delete by using #rm command but it didn't work.
I tried to delete using d command when i'm in the root mail (using #more command), but it still didn't work.
My /var directory space is getting compact (over 95% utilized) and I'm in the process of deleting unnecessary files in /var directory.
Please assist me.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 06:27 PM
тАО01-06-2008 06:27 PM
Re: How to delete mail messages
Take a backup of that file or copy it on other filesystem then nullify this file using the cat command as below
cat > /var/mail/
This will create more space under /var
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 06:41 PM
тАО01-06-2008 06:41 PM
Re: How to delete mail messages
I tried to use cat command and inserted:-
hi
my name
when I read back the mail...messages as below keep coming...
hi
my name
ern_file...] [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] [-e pattern_list...]
-f pattern_file... [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] pattern [file...]
grep: illegal option -- 3
grep: illegal option -- 4
grep: illegal option -- 2
grep: illegal option -- 0
grep: illegal option -- 0
grep: illegal option -- 0
grep: illegal option -- 8
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] -e pattern_list...
[-f pattern_file...] [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] [-e pattern_list...]
-f pattern_file... [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] pattern [file...]
grep: illegal option -- 3
grep: illegal option -- 4
grep: illegal option -- 0
grep: illegal option -- 4
grep: illegal option -- 0
grep: illegal option -- 4
grep: illegal option -- 7
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] -e pattern_list...
[-f pattern_file...] [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] [-e pattern_list...]
-f pattern_file... [file...]
usage: grep [-E|-F] [-c|-l|-q] [-bhinsvx] pattern [file...]
grep: illegal option -- 3
grep: illegal option -- 4
grep: illegal option -- 0
grep: illegal option -- 4
grep: illegal option -- 0
grep: illegal option -- 4
.
.
.
the size keep bigger.
# ls -l
total 471136
-rw-rw---- 1 root mail 234728993 Jan 7 10:34 root
# ls -l
total 471136
-rw-rw---- 1 root mail 239718479 Jan 7 10:34 root
# ls -l
total 503904
-rw-rw---- 1 root mail 252432821 Jan 7 10:34 root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 06:49 PM
тАО01-06-2008 06:49 PM
Re: How to delete mail messages
cat /dev/null > /var/mail/root
Make sure that u have a backup of this root file before executing this command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 07:22 PM
тАО01-06-2008 07:22 PM
Re: How to delete mail messages
I managed to empty the root mail.
But it keeps filling in with the unknown message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 07:32 PM
тАО01-06-2008 07:32 PM
Re: How to delete mail messages
Normally all root mails will go to to root and this file size increases but if it is increasing with in a day or so then it is a thing to look out...
Is there any other error message ??
How abt the mail delivery, are the messages being delivered by the system ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 08:12 PM
тАО01-06-2008 08:12 PM
Re: How to delete mail messages
hope u'll find something from this.
From MAILER-DAEMON@hpovnnm Mon Jan 7 11:00:22 mal 2008
Received: from localhost (localhost)
by hpovnnm (8.9.3 (PHNE_29774)/8.9.3) with internal id SLD25533;
Fri, 4 Jan 2008 20:50:37 +0800 (mal)
Date: Fri, 4 Jan 2008 20:50:37 +0800 (mal)
From: Mail Delivery Subsystem
Message-Id: <200801041250.SLD25533@hpovnnm>
To: postmaster@hpovnnm
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="SLD25533.1199451037/hpovnnm"
Subject: Postmaster notify: Cannot send message within 5 days
Auto-Submitted: auto-generated (postmaster-notification)
This is a MIME-encapsulated message
--SLD25533.1199451037/hpovnnm
The original message was received at Sun, 30 Dec 2007 05:33:24 +0800 (mal)
from localhost
----- The following addresses had permanent fatal errors -----
root
(expanded from: postmaster)
----- Transcript of session follows -----
mail: cannot append to /var/mail/root
mail: cannot create dead.letter
451 I/O error
Message could not be delivered for 5 days
Message will be deleted from queue
--SLD25533.1199451037/hpovnnm
Content-Type: message/delivery-status
Reporting-MTA: dns; hpovnnm
Arrival-Date: Sun, 30 Dec 2007 05:33:24 +0800 (mal)
Final-Recipient: RFC822; postmaster@hpovnnm
X-Actual-Recipient: RFC822; root@hpovnnm
Action: failed
Status: 4.4.7
Last-Attempt-Date: Fri, 4 Jan 2008 20:50:37 +0800 (mal)
--SLD25533.1199451037/hpovnnm
Content-Type: message/rfc822
Return-Path:
Received: from localhost (localhost)
by hpovnnm (8.9.3 (PHNE_29774)/8.9.3) with internal id EIR27294;
Sun, 30 Dec 2007 05:33:24 +0800 (mal)
Date: Sun, 30 Dec 2007 05:33:24 +0800 (mal)
From: Mail Delivery Subsystem
Message-Id: <200712292133.EIR27294@hpovnnm>
To: postmaster
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="EIR27294.1198964004/hpovnnm"
Subject: Postmaster notify: Cannot send message within 5 days
Auto-Submitted: auto-generated (postmaster-notification)
This is a MIME-encapsulated message
--EIR27294.1198964004/hpovnnm
The original message was received at Tue, 25 Dec 2007 02:06:15 +0800 (mal)
from localhost
----- The following addresses had permanent fatal errors -----
root
(expanded from: postmaster)
----- Transcript of session follows -----
mail: cannot append to /var/mail/root
mail: cannot create dead.letter
451 I/O error
Message could not be delivered for 5 days
Message will be deleted from queue
--EIR27294.1198964004/hpovnnm
Content-Type: message/delivery-status
Reporting-MTA: dns; hpovnnm
Arrival-Date: Tue, 25 Dec 2007 02:06:15 +0800 (mal)
Final-Recipient: RFC822; postmaster@hpovnnm
X-Actual-Recipient: RFC822; root@hpovnnm
Action: failed
Status: 4.4.7
Last-Attempt-Date: Sun, 30 Dec 2007 05:33:24 +0800 (mal)
--EIR27294.1198964004/hpovnnm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 08:18 PM
тАО01-06-2008 08:18 PM
Re: How to delete mail messages
What is the current status of the root mails and file size ??
try sending a test message ad check if it succeeds:
mailx -s "test"
test
.
then tail -f /var/adm/syslog/mail.log
check if stat is equal to sent or not ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 08:28 PM
тАО01-06-2008 08:28 PM
Re: How to delete mail messages
# mailx -s "test" 200801041250.SLD25533@hpovnnm
test
EOT
#
# tail -f /var/adm/syslog/mail.log
Nov 15 14:16:58 hpovnnm sendmail[23463]: SDN19702: to=root, delay=1+15:04:55, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:16:59 hpovnnm sendmail[23463]: SGG11673: to=root, delay=1+16:27:43, xdelay=00:00:01, mailer=local, stat=I/O error
Nov 15 14:16:59 hpovnnm sendmail[23463]: RZQ16262: to=root, delay=1+17:42:56, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:16:59 hpovnnm sendmail[23463]: RHA16262: to=root, delay=1+18:09:39, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:16:59 hpovnnm sendmail[23463]: SYP11673: to=root, delay=1+15:55:37, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:17:00 hpovnnm sendmail[23463]: RcN16262: to=root, delay=1+17:34:26, xdelay=00:00:01, mailer=local, stat=I/O error
Nov 15 14:17:00 hpovnnm sendmail[23463]: RqE16262: to=root, delay=1+17:20:48, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:17:00 hpovnnm sendmail[23463]: RZI16262: to=root, delay=1+17:43:15, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:17:00 hpovnnm sendmail[23463]: RZR16262: to=root, delay=1+17:42:56, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:17:00 hpovnnm sendmail[23463]: SFY11673: to=root, delay=1+16:28:38, xdelay=00:00:00, mailer=local, stat=I/O error
Nov 15 14:17:01 hpovnnm sendmail[23463]: SFN11673: to=root, delay=1+16:29:3#
#
# ls -l
total 4355184
-rw-rw---- 1 root mail 2147483647 Jan 7 11:32 root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 08:31 PM
тАО01-06-2008 08:31 PM
Re: How to delete mail messages
ps -ef|grep sendmail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 08:34 PM
тАО01-06-2008 08:34 PM
Re: How to delete mail messages
root 1149 1 0 Jan 3 ? 1:25 sendmail: accepting connections on port 25
root 23239 1149 71 11:20:30 ? 2:07 sendmail: WkA21954: from queue
root 9086 1067 1 12:27:16 pts/tg 0:00 grep sendmail
root 8554 1149 82 09:50:15 ? 4:58 sendmail: WfW21954: from queue
root 27325 1149 73 10:20:20 ? 3:44 sendmail: BHG06541: from queue
root 12383 1149 75 11:50:35 ? 1:10 sendmail: CQK05394: from queue
root 17450 1149 81 08:50:05 ? 9:03 sendmail: BGN06541: from queue
root 22168 1149 76 10:50:25 ? 2:51 sendmail: WgP21954: from queue
root 29921 1149 74 12:20:40 ? 0:11 sendmail: EQP26209: from queue
root 7365 1149 93 04:49:24 ? 17:06 sendmail: DAA05755: from queue
root 4421 1149 77 09:20:10 ? 6:37 sendmail: WPQ05845: from queue
#
what should I do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 08:57 PM
тАО01-06-2008 08:57 PM
Re: How to delete mail messages
Can you try stoping the sendmail process using "/sbin/init.d/sendmail stop"
then kill the other sendmail processes if any.
Then start the sendmail again using the following
/sbin/init.d/sendmail start
then check using ps command that it is listening at port 25 then test by sending a test mail as we did earlier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 09:28 PM
тАО01-06-2008 09:28 PM
SolutionHaving a mailbox size in GBytes
is not an ideal situation :)
Let's try to "attack" the problem from two fronts:
1. Deal with MTA sendmail
2. Deal with root mailbox
For the MTA, do the following:
a) Stop sendmail master daemon:
/sbin/init.d/sendmail stop
b) Kill the remaining sendmail child
processes.
c) Since the hung messages do not seem to
be of importance, remove them from the queue:
rm -f /var/spool/mqueue/*
d) Remove root's mailbox:
rm -f /var/mail/root
e) Check free space in /var file system and
also ensure that permissions on /var/mail
and /var/spool/mqueue directories are OK.
f) Check email delivery status for
root:
/usr/sbin/sendmail -bv -v -oL10 root
g) Restart sendmail:
/sbin/init.d/sendmail start
Then, send a message to another (non-root)
account:
mailx -s "test" someusername
If it works, repeat for root:
mailx -s "test" root
or even better:
/usr/sbin/sendmail -v root
CTRL-D
Let us know what happens.
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 10:45 PM
тАО01-06-2008 10:45 PM
Re: How to delete mail messages
I did all the steps.
1.Root can send mail to other user.
2.Size of mail root has decreased.
3.Var has only 33% utilization from 83% !!!
4.What is the Warning message as below means?
# /usr/sbin/sendmail -bv -v -oL10 root
WARNING: local host name (hpovnnm) is not qualified; fix $j in config file
root... deliverable: mailer local, user root
#
# /usr/sbin/sendmail -v root
WARNING: local host name (hpovnnm) is not qualified; fix $j in config file
root... Connecting to local...
root... Sent
#
Thanks all.
You all did great help on this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 11:27 PM
тАО01-06-2008 11:27 PM
Re: How to delete mail messages
Goot to see you are operational again :)
Your problem with short hostname is easily resolved in one of two ways:
a) Simplest method - add or change the entry in /etc/hosts. For example:
192.168.1.55 myhost.mydom.dom myhost
You probably have something like the following currently:
192.168.1.55 myhost
b) Or, uncomment the following line in the
/etc/mail/sendmail.cf file by deleting the pound sign (#) at the beginning of the following line:
Dj$w.Foo.COM
Change Foo.COM to the name of your domain (for example, mydom.dom).
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 11:44 PM
тАО01-06-2008 11:44 PM
Re: How to delete mail messages
Probably just files.
Should be
files [ NOTFOUND=continue ] dns
Next, your /etc/resolv.conf needs to contain the ip's of your dns servers.
Now, in your own domain, do you have a smart relay server? if yes, then on "Care Manager 9" server in /etc/mail/sendmail.cf set the DS macro to that smart relay server:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2008 11:49 PM
тАО01-06-2008 11:49 PM
Re: How to delete mail messages
Is this the answers I'm looking for to solve the warnings????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2008 12:14 AM
тАО01-07-2008 12:14 AM
Re: How to delete mail messages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2008 07:19 PM
тАО01-07-2008 07:19 PM
Re: How to delete mail messages
I am just interested to decrease the percentage of /var directory utilization.
It has helped me a lot.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2008 07:28 PM
тАО01-07-2008 07:28 PM