Summary: Can't reeive mails !!!

From: Bhuwan Pandey (kz3vw1@unixrsm.ahipc.eds.com)
Date: Thu Dec 16 1999 - 10:07:04 CST


Hi Admins,

Thanks to all who responded to my query.

Vern Walls answer helped me.
----------

The orignal question was :
----------------------------
My one user can not receive mails, but he can send mails.
I have checked all the possible reasons to failure in receiving mails. But could
not find out any problem.

checked permission of /etc/mail/sendmail.cf, /etc/nsswith.conf,
/var/mail/user-id, file systen /var/mail

when I send a mail to him, I get a returned mail(attached here)
(I also tried sending a mail using /usr/lib/sendmail -v command, it seems to be
fine)

Solution: Actually the user had two diffirent UID's having same login.
So it the mail was confused and did not work.

the summary is here :
*************
        The /var/mail/rzbyv6 should belong to rzbyv6 and
        the group should be mail. BTW, the /var/mail
        directory should be checked as well :

<hp735>[emile]<132> ll -d /var/mail/
drwxrwxrwt 2 root mail 1024 Dec 16 08:26 /var/mail/
<hp735>[emile]<133>

        chmod 1777 /var/mail/ ; chown root:mail /var/mail/

*************
> If mail.local is setgid() then /var/mail/rzbyv6 must belong to the
> same group as mail.local.
>
> could you please explain me the above sentence and how to check this.

mail.local can only write to rzbyv6 if it runs as user rzbyv6 (because
the mode is "rw-" for the owner of rzbyv6) or if it runs as group mail
(because the mode is "rw-" for the group mail).

Since mail.local is not belonging to the group mail and has no setgid
bit set, it cannot write.

% chgrp mail mail.local # make mail.local belong to group mail
% chmod 660 rzbyv6 # anybody can read rzbyv6's mail otherwise!
% chmod 2555 mail.local # make mail.local "-r-xr-sr-x"
*****************

Either you have duplicated user ID numbers in /etc/passwd (two or more user
names have the same ID number), or the file above exists and is owned by someone
besides the user "rzbyv6"

Let me know how this works out, please.
****************
        he permissions of the file and the directory have to be the same group
as the sendmail process.

ll /usr/lib/sendmail
ll -d /var/mail
ll /var/mail/rzbyv6

May also want to check that the setgid bit is set on sendmail. Or the setuid bit
is set and the owner is root but that has bad security repercussions.

Should all the be same group.
*************
Check the permissions of /var/mail and /var/mail/<username> again.
Look at the mode, user owner, and group owner.
***********************************

The user may have a local account on hi system, and the
uid may not match that on the mailhost server from where
he mounts /var/mail. I would check owner of mail file,
and su to user on that system and check uid of user.

*****************
kz3vw1 is somehow aliased to rzbyv6@wtc.nec.gmeds.com either through the
normal mail aliases of through a .forward file in his home directory. The
file /var/mail/rzbyv6 on machine wtc.nec.gmeds.com is eithe not owned by
user rzbyv6, or the files group is not mail, or both.

**************
The problem is with /var/mail/username. Permissions should be 660,
ownership user:mail

*****************
Check DNS for his devic
************
> mail.local: /var/mail/rzbyv6: wrong ownership (14987)

It's VERY clearly saying the user's mailbox is owned by the wrong UID.
***************************
> mail.local: /var/mail/rzbyv6: wrong ownership (14987)

There's your answer ...
***********



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