1751858 Members
5563 Online
108782 Solutions
New Discussion юеВ

Mail to root

 
Bob Davis
Occasional Advisor

Mail to root

I'm trying to send mail to root on a 10.20 box and here's what I get:

sendmail -v mailadm < /etc/hosts
mailadm... Connecting to local...
/var/mail/mailadm.lock: Permission denied
mail: /var/mail/mailadm.lock not creatable after 10 tries
mailadm... Can't create output: Error 0
root... aliased to root
/dead.letter... cannot open: Permission denied
root... Connecting to local...
/var/mail/root.lock: Permission denied
mail: /var/mail/root.lock not creatable after 10 tries
root... Can't create output: Error 0

This also happens with other local users.
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: Mail to root

Check the permission for /var/mail directory. It should be 775 (bin:mail).
someone_4
Honored Contributor

Re: Mail to root

Hello

Try moving your .lock files somewhere else.
And check your permissions as follows going up to /var/mail/root

dr-xr-xr-x 21 bin bin 1024 Feb 10 2001 var

drwxrwxr-x 2 bin mail 1024 Mar 27 21:03 mail

-rw-rw---- 1 root mail 0 Mar 26 23:58 root

Hope that helps

Richard

Sanjay_6
Honored Contributor

Re: Mail to root

Hi Bob,

check the permissions on your /var/mail directory. The /var/mail sirectory should be writable by the system and should be readble by the world.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: Mail to root

Hi Bob,

Also check the permission on your sendmail file,

chown root:mail /usr/sbin/sendmail

Restart sendmail,

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

now send an email and try.

Hope this helps.

Regds
someone_4
Honored Contributor

Re: Mail to root

Hello
One more thing that I found ..

MAIL: elm and mail programs unable to create lock files for users

Current Path Home
Score : 0
Document Type : EN
Date : 1998 Oct 22
Description : MAIL: elm and mail programs unable to create lock files for users
Document Id : A5387830
Search String : A5387830

You may provide feedback on this document

View the printer friendly version of this document



--------------------------------------------------------------------------------

Problem Description

I am using version 8.86 of Sendmail and I am
experiencing a problem that occurs on six of
my servers.

elm seems to work correctly for root, but fails
for users with the following message:

elm can't create lock file, needs permission in /var/mail

When executing the mail command /usr/bin/mail/.lock
cannot be created after 10 tries.

What is causing this problem?

Configuration Info

Operating System - HP-UX
Version - 10.20
Hardware System - HP 9000
Series - K460

Solution

This problem has been known to occur when root has
the $MAIL variable set to /var/mail/root, but users
have it set to /usr/bin/mail.

$MAIL should not be set to the bin path. We recommend
you locate which profile is setting the $MAIL variable
to the incorrect path.

Here is the link

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=cd4f12ef01bd389981/screen=ckiSearchResults?mode=id&searchString=A5387830

Richard