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>.mlkMMDF ONLY:In order to prevent this from happening again, edit the mmdftailor file:
cd /usr/mmdf
vi mmdftailorFind 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)