Technical article 109060

"Can't open folder for reading - /usr/spool/mail" when using ScoMail.

OpenServer 5.0.0

Written · Last revised

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 #1

Remove the MAIL environment variable from the user's .profile. When no MAIL variable is set, SCOMail will find the user's mailbox automatically.

WORKAROUND #2
Change 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 #3

Create 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/username

Permissions on this file should be 600 and owned by the user.

WORKAROUND #4

Create .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/username

Permissions 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).

From the Xinuos technical article database, record 109060. Reproduced with permission. The original is at www.sco.com/ta/109060, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.