SUMMARY: User can send mail to self, Others cannot send mail to it

From: Daniel_V._D'
Date: Mon Jul 03 1995 - 12:33:43 CDT

Original Post:
> Howdy All!
> My user has the following oddball problem - they can send mail to themselves
> just fine. Others cannot. The returned mail reads the following message
> mail: /var/spool/mail/bob cannot append
> mail: cannot open dead.letter
> Mail: I know I sound worthless, but just give me another chance, ok ?
> I have checked to be sure that the file is of the correct owner, and the
> partition is not full. The machine has only just started to export several
> its partitions. It has run fine for the past 10 months.
> After being reset to do some exports, a system crash occurred. The users
> directory was moved from /home/bob to /exports/home/bob. Otherwise, the
> could not find its home directory. The account was local to the machine.
> machine is using NIS.
> If anyone has a good idea of what to check next, I 'll try it!
> --dan
/bin/mail was set to 4755. The user was sent mail from somebodies account.
The size of /var/spool was seen to increase. I checked the spool, and it was
the test message.

Many thanks to all who replied! The suggestion of using the sysadmin as a
human sacrifice was rejected due to the last second observation that most
sysadmins are not human.

Please check the permition on /var/spool/mail/bob, make sure other
can write to that dir.
 Have you checked the directroy permissions on /usr/spool/mail?
WHoops..sorry: on /var/spool/mail?
I had the same problem before, the problem was with the group
permission of the user mail box (/var/spool/mail/bob). Check
with ls -l /var/spool/mail/bob, and if the group write bit is
not enabled, then enable it and try again. The reason is sendmail
runs as mail or daemon group, in order to be able to append to the file,
it has to be able to write to it.
Make sure that:
/var/spool/mail is world writaeable with sticky bit turned on (chmod 1777)
The users home directory (see ypmatch) is owned by the user and has write
/bin/mail is setuid root
Check the permissions on /bin/mail (if that is your local mail delivery
program) ... it must be set-uid root.
If a user can send mail to himself but to no other users on the same
machine, it can only mean that your sendmail is not running
with root priviledges. To fix it: chown root /usr/lib/sendmail
and chmod u+s /usr/lib/sendmail.
How about the permissions on /var/spool/mail? It should be drwxrwsrwx.
Check the permissions of /bin/mail and /usr/lib/sendmail.
The two programs are setuid to root, if the setuid bit is
gone you would see the problem appending users' mail.
check the ownership of /var/spool/mail/* -- some files may note
be owned by the correct person
        Check the permissions on /bin/mail. Should be owned by root and
setuid. chown root . . . . chmod 4755
        This was my problem that produced the same problems.
my guess to your mail problem is that sendmail doesn't have the right
-r-sr-x--x 1 root 398596 Mar 14 11:54 sendmail*
make sure /usr/lib/sendmail and /usr/bin/mail are setuid root.
I wonder if /usr/lib/sendmail isn't setuid any more; also you might try as
root the following: /usr/lib/sendmail -v some_user@host </dev/null
I don't know if this is any help or not, but I seem to remember a similar
problem on this list a while back. I think the solution then was that
/bin/mail HAD to be 'chmod 4755'ed.
Sorry if I'm barking up the wrong tree / Hope it helps
Sounds like a permissions problem. Doublecheck the permission on the
sendmail file, and the mail spool directory. The sendmail should run setuid
root, and the mail spool should have "drwxrwsrwt" permissions. Hope this helps.

"If the US postal service went email, how would you get stamps on this stuff?"
-- Crazy Wasserman, 1986 ( or 2 A. I. for after Internet )

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:28 CDT