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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Root Mail error

Status
Not open for further replies.

kmz

Technical User
Oct 3, 2000
22
GB
Hi,

Seem to be getting the following error message when running elm:

Warning:
Elm requires the directory -- $HOME/.elm to store your elmrc and alias files.
Do you want to create the directory, now (y/n)? No
Okay. But, you may have some problems later.

Reading in /var/mail/root, message: 0
Mail file is corrupt!! Can't read it!!

When checking the /var/mail root directory for the permissions, get the following output:

-rwxrwxrwx 1 root mail 103034 Nov 7 10:00 root

Would appreciate someones help with the corrupt file error message, thanks.

KMZ
 
hi,

you've got quite a bit of mail for root there....

you *can* just delete the file without causing any damage and you will probably end up doing that.

before you do though, use pg to skim the file to pick up any important system messages, start from the bottom (the $ command) and work your way back (with the -1 command)
Mike
michael.j.lacey@ntlworld.com
 
Hi Mike,

I have checked the file and trimmed it down to a very small and manageable size. But then when I rum elm again, still get the above mentioned message i.e. Mail file is corrupt cannot read it !. If I delete the root file, while it automatically generate a new file then, Secondly I also have seen the following message as well:

Warning:
Elm requires the directory -- $HOME/.elm to store your elmrc and alias files.
Do you want to create the directory, now (y/n)? No
Okay. But, you may have some problems later.

Another elm is already reading this mail!

[if this is in error then you'll need to remove '/tmp/mbox.root']


Regards

KMZ
 
ok, the lock file, '/tmp/mbox.root', is still there from a previous run of elm -- just delete it if you're sure no one else is running elm as root.

you may as well delete the mail file as well if you have looked through it, after saving a copy of it somewhere obviously..

if you're going to use elm you'll have to answer Yes to the create dir question by the way, there shouldn't be any problem with that
Mike
michael.j.lacey@ntlworld.com
 
This may be a silly question, but have you looked to see what $home is pointing you to by doing a pwd? As a side note, it appears as though you have alias's on your system. Has root checked what is happening to the 'elm' directory? Does 'elm' have a "grant" capacity?
 
The following resolution came from HP's technical support site. We experienced the same problem, caused by inadvertently changing the mail file with an editor; a slash (/) was inserted in front of a mail header. We used vi to correct the mail header. Elm was happy.

Mail: Folder is corrupt!! I can't read it!!


printable version

path: Home HP-UX Software

date: 6/17/02
document description: Mail: Folder is corrupt!! I can't read it!!
document id: KBRC00009903





You may provide feedback on this document



--------------------------------------------------------------------------------
Mail: Folder is corrupt!! I can't read it!! DocId: KBRC00009903 Updated: 6/28/02 7:17:00 AM

PROBLEM
The following error message displays when trying to read root mail with elm:
Reading in /var/mail/root, message: 0 Folder is corrupt!! I can't read it!!
The same problem can exist for non-root users, so use the same procedure replacing /var/mail/root with /var/mail/user_name_here.
How to resolve?

RESOLUTION
Check that the mail file exists and has the correct permissions:
# ll /var/mail/root
-rw-rw---- 1 root mail 23855 Jun 16 06:03 root

If necessary:
# chmod 660 root

Verify the file is not corrupt. The first line of the file should contain a valid header.
For instance:
"From root@fletch.hp.com Sun Dec 9 06:00:56 EST 2001"

In this particular situation, the first line of the file is:
---------- End Event Monitoring Service Event Notification----------

To correct this problem, use vi to delete the first few lines of the file until the first record in the file is a valid header.
# cp /var/mail/root /tmp/saved.mail
Note: this file can be removed after the file is successfully edited and the problem is corrected.

# vi /var/mail/root
With vi, use dd to delete the current line.
To save and exit, use:
: wq!
Try accessing mail again.


 
your mail may say that it is corrupt because when trimming
you trimmed data that has messuped the header info for mail.

elm can not tell where mail begins or ends....

You will have to vi the file...
and dd each line until you find The first line that reads
line something

From <some place>
X-UIDL: <some stuff>
Return-Path:



If you do not know enough to find this information...
You will have to use more, pg, vi, or something to read the mail.. Then remove the file or
cat /dev/null > <your mailfile>

That should correct the issue for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top