procmail
[Top] [All Lists]

Re: procmail permission/group problem

1999-01-11 23:49:02
John Sprinkle <sprinkje(_at_)asc(_dot_)hpc(_dot_)mil> writes:
I have installed procmail as a replacement for /bin/mail on my mail
server running IRIX  6.5.  My /var/mail directory is located on a NFS
mounted directory.  Whenever a new mailbox is created in the /var/mail
directory it has the wrong permissions and group.  For example for user
bob it does the following:

                                                 permissions
owner         group
the way is should be:                 -rw-rw----        bob
mail

the way procmail is working:   -rw-------        bob              bob

The permissions on my /var/mail directory are rwxrwxrwt and the
permissions on /usr/bin/procmail are
rwsr-sr-x.  What am I doing wrong?

Procmail will give _new_ spool files permission of 660 if and only if

a) the spool directory is _not_ owned by the user as which procmail is
   running, and
b) the spool directory is _not_ world writable, _or_ the sgid bit is set
   on the directory, and
c) procmail is setgid to the group of the spool directory (or otherwise
   has a matching egid).

So, you'll need to choose a non-root user (uid != 0) that is not otherwise
used (you may have to create one for this), and change the spool directory
to be owned by it.  Then, turn on the sgid bit on the spool directory:

        chown mailspool /var/mail       # or whatever user you use
        chgrp mail /var/mail            # just in case...
        chmod g+s /var/mail             # or chmod o-w /var/mail

Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>