Hi,

On Sat, Jul 28, 2012 at 02:30:07PM +0200, dannielou wrote:
> Package: maildrop
> Version: 2.2.0-3.1
> Severity: normal
> Tags: upstream

How do you know this is upstream bug?  Did you contact them and they
agreed?  I doubt it since this permission thing is somewhat Debian
specific.  Please do not bother upstream until you are absolutely sure.

 
> Hello,
> 
> Here is the way to reproduce this bug. I was able to reproduce this bug on
> debian stable and freebsd 9.

Please do not be too confident on "Tags: upstream" just because you see
it in 2 dists.  I do not know how freebsd configues this package.  At
least, Debian package is heavily modified. (I am removing tag.)

Have you read:  README.Debian.gz
"Difference between maildrop and courier-maildrop"

Permission policy is different from upstream.

> apt-get install maildrop
> add a user testuser and a group testgroup
> Change home directory of testuser to /home/testdir/testuser
> edit /etc/maildroprc and uncomment DEFAULT="$HOME/Maildir"
> Change ownership of /home/testdir
> # ls -ld /home/testdir
> drwxr-xr-x 3 root testgroup 4096 Jul 28 13:50 /home/testdir
> 
> # cat /etc/passwd|grep test
> testuser:x:1001:1001:,,,:/home/testdir/testuser:/bin/bash
> # cat /etc/group|grep test
> testuser:x:1001:
> testgroup:x:1002:testuser
> 
> 
> Now mail delivery works if /home/testdir has 0755 perms :
> 
> # chmod 755 /home/testdir
> # echo "testmail" |maildrop -V 3 -d testuser
> ERR: authdaemon: s_connect() failed: No such file or directory
> maildrop: Changing to /home/testdir/testuser
> Message start at 0 bytes, envelope sender=testuser
> maildrop: Attempting .mailfilter
> # cat
> /home/testdir/testuser/Maildir/new/1343476846.M402842P17286V0000000000000802I000000000057A00A_0.barret\,S\=9
>  
> testmail
> 
> But if /home/testdir has 0750 perms and belongs to root:testgroup, mail 
> delivery
> fails even if testuser is in group testgroup :
> 
> # chmod 750 /home/testdir
> # ls -ld /home/testdir
> drwxr-x--- 3 root testgroup 4096 Jul 28 13:50 /home/testdir
> # echo "testmail" |maildrop -V 3 -d testuser
> ERR: authdaemon: s_connect() failed: No such file or directory
> maildrop: Changing to /home/testdir/testuser
> maildrop: Unable to change to home directory.
> 
> Note that testgroup is not the primary group of testuser

Did you check why "ERR: authdaemon: s_connect() failed: No such file or
directory" is printed.  This looks like some other thing is blocking.
Possibly dovecotauth.  In order to make it work, you need some manual
adjustment.

Also, this may be related to:
* Privileges

maildrop and lockmail.maildrop are installed setgid mail so that they can
do mailbox locking in the /var/mail directory. setuid root is removed
intentionally, you shouldn't ever really need it and it poses a potential
security risk (as any other suid binary).

The go-r restriction on .mailfilter* is removed in the Debian package;
the restriction that files may not be writable by the world remains.

I am running maildrop from user account.  So this complicated set up
from root is not something I focuses.  If you have folloing explicitly
stated, I may change this package.  This package needs some previlidge
adjustment if you wish to do something complicated.  that is the feature
of this package.

* What is the purpose of setting system the way you set up?
* What is the problem not to use the set up working for you?
* What solution do you suggest me?

Osamu


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to