Mark Sansome wrote:
> A reader of this list replied to me off-list and made this comment:
>
>
>> On Tue, 7 Aug 2007, Mark Sansome wrote:
>>
>>
>>> The problem is that (running procmail as root) if I follow the
>>> instructions I have found on various setup guides (including the
>>> SA wiki) I am supposed to put "DROPPRIVS=yes" into
>>> /etc/procmailrc. If I do that SA works fine, but procmail is
>>> unable to put mail for my other users in their /var/spool/mail
>>> directories.
>>>
>> Everybody should own and have write permission to their own mailbox...
>>
>>
>
> Well, naturally. I thought...
>
> And then I checked. Just to be sure...
>
> This looks OK:
> [EMAIL PROTECTED] ~]# ls -l /var/spool/mail/
> total 53240
> -rw-rw---- 1 admin mail 0 Jun 11 20:55 admin
> -rw------- 1 clamav mail 76386 Apr 22 17:04 clamav
> -rw-rw---- 1 wifey mail 44024789 Aug 7 10:48 wifey
> -rw-rw---- 1 mark mail 4020 Aug 7 17:11 mark
> -rw------- 1 root root 10316397 Aug 7 04:40 root
> -rw-rw---- 1 son1 mail 24127 Apr 7 11:03 son1
> [EMAIL PROTECTED] ~]#
>
> So does this:
> [EMAIL PROTECTED] ~]$ ls -l $MAIL
> -rw-rw---- 1 mark mail 4020 Aug 7 17:11 /var/spool/mail/mark
>
> But this looks wrong...:
> [EMAIL PROTECTED] ~]$ su wifey
> Password:
> [EMAIL PROTECTED] mark]$ ls -l $MAIL
> -rw-rw---- 1 mark mail 4020 Aug 7 17:11 /var/spool/mail/mark
> [EMAIL PROTECTED] mark]$ mail
> /var/spool/mail/mark: Permission denied
>
You must use 'su - wifey' to change the user environment.
from 'info su' :
`-'
`-l'
`--login'
Make the shell a login shell. This means the following. Unset all
environment variables except `TERM', `HOME', and `SHELL' (which
are set as described above), and `USER' and `LOGNAME' (which are
set, even for the super-user, as described above), and set `PATH'
to a compiled-in default value. Change to USER's home directory.
Prepend `-' to the shell's name, intended to make it read its
login startup file(s).
/Gabriella /