1754325 Members
2391 Online
108813 Solutions
New Discussion

No MAIL.MAI file

 
SOLVED
Go to solution
da1nonly1
Advisor

No MAIL.MAI file

Hi,

I’m trying to use my VMS mail, I can get into the MAIL utility, but if I try to do there something I get this message:

%MAIL-E-OPENIN, error opening
-RMS-E-FNF, file not found
%MAIL-E-NOMSGS, no messages

and indeed this file doesnt exist.
How can I create it?

Thanks, Yaron.

17 REPLIES 17
EdgarZamora_1
Respected Contributor

Re: No MAIL.MAI file

well one quick way would be to send a message to yourself.

Hoff
Honored Contributor

Re: No MAIL.MAI file

MAIL creates the MAIL.MAI file under normal conditions, so this could easily be a case where you do not have a login directory, where you have an invalid SYS$SCRATCH: directory, or there is something else odd about your context.

If you do have a default login directory (if DIRECTORY SYS$LOGIN:/SECURITY shows some files, and shows that you own the files, and if DIRECTORY SYS$SCRATCH:/SECURITY works similarly), then invoke MAIL. Within MAIL, issue the SHOW MAIL command. This will show if MAIL has been configured with a mail subdirectory.

If you have a mail subdirectory set, then it either doesn't exist, or it is somehow corrupt. You can RENAME the existing subdirectory, or otherwise save the contents somewhere else. Then issue a SET NOMAIL and a SET MAIL [.MAIL] to re-create the subdirectory and the MAIL.MAI file.

If you have no mail subdirectory set but you do have a mail subdirectory around (use SET DEFAULT SYS$LOGIN:, DIRECTORY [*...]MAIL.MAI to look for this directory), you will have to re-establish the mail subdirecory by renaming the entirre contents of the mail subdirectory back to the SYS$LOGIN: directory (RENAME ddcu:[dir]MAI*.MAI SYS$LOGIN:), and then issuing the MAIL command SET MAIL [.MAIL], or whatever other subdirectory you want your MAIL stored in to re-enable the subdirectory. This SET MAIL command will rename the pieces back into the subdirectory. (There are other ways to do this...)

FWIW: most folks use [.MAIL] for the name of the MAIL subdirectory.

If this is a cluster and particularly one with multiple system disks or with core system database files relocated, one of the more common triggers for this MAIL (mis)behaviour is a failure to properly configure the dozen or so files that must be shared. This can be a problem, as it means you'll have to reset some set of MAIL subdirectories when you re-establish a common MAIL profile. See the system default template file SYLOGICALS.TEMPLATE on V7.2 and later for the list of the various core files that should usually be shared, and that should be synchronized across all cluster systems.

Stephen Hoffman
HoffmanLabs
Hoff
Honored Contributor

Re: No MAIL.MAI file

And if one of those replies don't solve this for you, please post the OpenVMS version and some system configuration details, and the particular command(s) and sequence(s) you've tried that generate these error messages. Also look for MAIL or UPDATE ECO kits, as these tend to be available for most OpenVMS releases.

Hein van den Heuvel
Honored Contributor

Re: No MAIL.MAI file

I don't think versions or patches are going to matter for this. This is too big a problem to be VMS dependend. SImply a user issue.


>> %MAIL-E-OPENIN, error opening

It did not say just that did it?
Did it not include a file specification where it tried to find it?
Was that a reasonable file specification?
Did that directory exist?
Do you have the rigth to read/write there?

The mail (sub)directory may have been changed using MAIL> SET MAIL ...
This updates SYS$SYSTEM:VMSMAIL_PROFILE.DATA

To see that, as you get into VMSMAIL, at the MAIL> prompt type in "SHOW ALL"
:
Your mail file directory is :...
:

For yucks you can also verify VMSMAIL_PROFILE the hard (easy?) way:

$ open/read/share=write x sys$system:vmsmail_profile.data
$ read/key=HEIN x y
$ show sym y
Y = "HEIN ..........Hein van den Heuvel..........[.VMSMAIL]"
$ close x


At any rate... just send yourself a mail and you should get a fresh MAIL.MAI file, providing the directy path and protection are valid.

Regards,
Hein.

EdgarZamora_1
Respected Contributor

Re: No MAIL.MAI file

Perhaps I should elucidate on my one line response.

SOURCE> delete mail.mai.*
%DELETE-W-SEARCHFAIL, error searching for SYS$USERS:[EZAMORA]MAIL.MAI;*
-RMS-E-FNF, file not found
SOURCE>
SOURCE> mail

MAIL>
%MAIL-E-OPENIN, error opening SYS$USERS:[EZAMORA]MAIL.MAI as input
-RMS-E-FNF, file not found
%MAIL-E-NOMSGS, no messages

MAIL> send
To: ezamora
Subj: bingo!
Enter your message below. Press CTRL/Z when complete, or CTRL/C to quit:
Exit
New mail on node SOURCE from SOURCE::EZAMORA (15:44:32)

MAIL>

#1 19-JAN-2007 15:44:32.57 NEWMAIL
From: SOURCE::EZAMORA
To: EZAMORA
CC:
Subj: bingo!


MAIL> Exit
SOURCE> dir mail.mai

Directory SYS$USERS:[EZAMORA]

MAIL.MAI;1

Total of 1 file.
SOURCE>
da1nonly1
Advisor

Re: No MAIL.MAI file

Hi,

Thanks for the answers. It didnt help sending an E-mail to myself, the message I got was the it cant open my home directory directory file - YARON.DIR
This MAI file never existed since my user account was created. It seems the mail utility thinks that my home directory directory file is the mail file. The system administrator copied another MAIL.MAI file to my directory, is that dangerous? can I safely now try using my mail?

thanks, Yaron.
Jan van den Ende
Honored Contributor
Solution

Re: No MAIL.MAI file

Yaron,

>>>
Thanks for the answers. It didnt help sending an E-mail to myself, the message I got was the it cant open my home directory directory file - YARON.DIR
<<<

This does ring a bell (from long time ago, but then again, might weel be still applicable).

What _IS_ your home directory?
Specifically, what is the value of the /DEVICE specified for you in the SYSUAF.
_IF_ it is what I suspect, than that device is specified as a Logical Name. If so, check that this Logical Name is valid in the System or Cluster table AND IS SPECIFIED in EXECUTIVE mode !!
Long ago I spent many hours to find that Supervisor mode LNMs are NOT working for MAIL.

PS I am not feeling happy about the idea of a copied MAIL.MAI file..

hth.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Hein van den Heuvel
Honored Contributor

Re: No MAIL.MAI file

>> It didnt help sending an E-mail to myself, the message I got was the it cant open my home directory directory file - YARON.DIR


So that DID help, it told you where to look!
But did it not say something more?
Like: "insufficient privilege or file protection violation"

So that's you problem. Address it.

>> This MAI file never existed since my user account was created.

That's ok.

>> It seems the mail utility thinks that my home directory directory file is the mail file.

No, it just needs to go through there.
[re-read my prior reply on VMSMAIL_PROFILE]

>> The system administrator copied another MAIL.MAI file to my directory, is that dangerous?

No just silly. It's tricky to get the ownership and protection correct. Let VMSmail do it!

>> can I safely now try using my mail?

What are you waiting for?!

Anyway, the best route to resolution is probably to simply pay very close attention to the exact error message being reported.

Potentially use the AUDIT subsystem to see what it being touched and why it fails.

Personally I would borrow CMKRNL for a while and use SET WATC FILE
For example (cut down a little):

$ set prot=(s,o,g,w) vmsmail.dir
$ dir/prot vmsmail.dir
:
VMSMAIL.DIR;1 (,,,)
$SET WATCH FILE/CLA=MAJOR
$ mail
Access SYSUAF.DAT;6 (15948,535,0)
Access VMSMAIL_PROFILE.DATA;5 (7784,3,0)
MAIL> send/noedit
To: _hein
Subj: test
Access HEIN.DIR;1
Create/Access MAIL_19D680_SEND.TMP;1 (25949,1456,0)
Control function (25949,1456,0)
Enter your message below. Press CTRL/Z when complete, or CTRL/C to quit:
test
Modify MAIL_19D680_SEND.TMP;1 (25949,1456,0)

Deaccess (25949,1456,0) Reads: 0, Writes: 2
Access MAIL_19D680_SEND.TMP;1
Access VMSMAIL.DIR;1 (17691,4646,0) Status: 00000024
Create-if Access (0,0,0) Status: 00000024
%MAIL-E-SENDERR, error sending to user HEIN
-MAIL-E-OPENOUT, error opening DRA3[HEIN.VMSMAIL]MAIL.MAI as output
-RMS-E-PRV, insufficient privilege or file protection violation
Deaccess (25949,1456,0)
MAIL>

Access HEIN.DIR;1 (10537,3300,0)
Deaccess (10537,3300,0)
Delete MAIL_19D680_SEND.TMP;1 (25949,1456,0)
Access HEIN.DIR;1 (10537,3300,0)
Deaccess (10537,3300,0)
Deaccess (15948,535,0)
Deaccess (7784,3,0)

Have fun!
Hein.
da1nonly1
Advisor

Re: No MAIL.MAI file

Thanks again. When I tried sending a mail to myself and I got the message about the YARON.DIR he also told that there is a permission or a protection problem (I dont want to try it again now after he copied the MAIL.MAI to my directory). And yes, my home directory is YARON. In this machine Im not allowed to go into the AUTHORIZE utility. I can suggest the system manager to check or change there, but what?

Thanks.