Problem
Users get "Can't open folder for reading - /usr/spool/mail"
after clicking on ScoMail icon in a scologin session but can
read mail with /usr/bin/mail or with ScoMail from a startx
session. Root can read mail with ScoMail from either scologin
or startx session. Cause
The MAIL environment variable is not getting set properly
or is being overwritten. MAIL should be set to
/usr/spool/mail/`logname` but is not getting expanded
during a scologin session so that MAIL gets set to
/usr/spool/mail/ instead. ScoMail tries to read
/usr/spool/mail/ and returns the error.Setting the MAIL variable manually does not change this behavior.
Solution
Use one of the four workarounds outlined below.
WORKAROUND #1Remove the MAIL environment variable from the user's .profile. When no MAIL variable is set, SCOMail will find the user's mailbox automatically.
WORKAROUND #2Change the users' mailboxes from /usr/spool/mail/username
to $HOME/.mailbox:From the Desktop, select System Administration -> Mail -> MMDF Configuration -> Additional Options -> Mailboxes
Select 'The user's home home directory' and save this configuration.
Move the users' mailboxes from /usr/spool/mail/username to each users' home directory ($HOME/.mailbox).
WORKAROUND #3Create ScoMail file in each users' home directory:
Copy /usr/lib/X11/app-defaults/ScoMail to each users' $HOME.vi $HOME/ScoMail and search for 'startUpFolder'Uncomment and edit this line so it looks like the following where username is the user's login.
*startUpFolder: /usr/spool/mail/usernamePermissions on this file should be 600 and owned by the user.
WORKAROUND #4Create .Xdefaults-hostname file in each users' home directory:
Create $HOME/.Xdefaults-hostname file in $HOME where hostname is the name of the machine on which the client is running.
Add the following line in this file where username is the user's login.
ScoMail*startUpFolder /usr/spool/mail/usernamePermissions on this file should be 600 and owned by the user.
This has been reported to SCO Engineering.
See also
See manual pages on scomail(XC) and scologin(XC).