Technical article 107579

The system hangs when I invoke the "mail" program

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4

Written · Last revised

Problem

When I invoke the "mail" program, using either MMDF or sendmail,
there is no response and the systems hangs. In sendmail, mail
queues up in mqueue but isn't delivered.  The syslog will
report an error similar to:

Sep 22 22:35:30 hostname lmail[1004]: can't create mailbox for root: Operation would block

Cause

In sendmail:  The lmail program interprets incoming mail
received from sendmail and delivers it to the specified user
on the local machine. It locks the user's mailbox using the
mailx locking mechanism during the mail delivery process.  If
the lmail program is terminated while the mailbox lock is in
place, the locking file will remain in the user's mailbox
preventing further mail delivery.
In MMDF:  A similar resource locking procedure is used by
submit.  A lock file is placed in the user's mailbox until
the mail delivery is completed.  If the file is present, submit
will return a "Partial Failure" and not deliver any further
mail until the file is removed.

Solution

Log in as root. Remove the <username>.lock file from the mail directory by issuing the command:

rm /usr/spool/mail/<username>.LOCK or alternatively,
rm /usr/spool/mail/*.LOCK to remove all .LOCK files.
SENDMAIL ONLY:

Remove the mail lock file by issuing the command:

rm /tmp/<username>.mlk
MMDF ONLY:

In order to prevent this from happening again, edit the mmdftailor file:

cd /usr/mmdf
vi mmdftailor
Find the following section and add the line MLCKTYPE advisory
as shown:
           ;
           ; ****************************************************
           ;
           MLNAME "host"
           MLDOMAIN "domain.com"
      -->  MLCKTYPE advisory
           ^^^^^^^^^^^^^^^^^

Run /usr/mmdf/table/dbmbuild -nv to rebuild the mmdftailor file.

See also

submit(ADM), mmdf(ADM), sendmail(ADMN), lmail(ADMN), mail(C)

From the Xinuos technical article database, record 107579. Reproduced with permission. The original is at www.sco.com/ta/107579, 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.