Edward Martin | 4 May 2008 02:07
Picon

maildrop works for root but not for the user postfix

Hi,

I am trying to follow this tutorial, http://www.phparchitecture.com/howto_show.php?id=2 and for the
most part stuff is working, however maildrop is not, i have configured everything to use
vmail(37)/vmail(37) for maildrop and storing messages. When root send a message it will go into
/home/vmail/mysite.com/edman007/Maildir/new as a separate file, however when the user vmail sends an
email it will get appended to the file /home/vmail/Maildir, and that is not the behavior i want. I have
checked and i see no .mailfilter or maildroprc files anywhere on the system. maildrop is 750 and setuid
(root/vmail). the authentication is done through mysql and it works as shown in the authtest output.

I want the behavior that i see when its run as root, but i don't see the configuration anywhere that would say
its one way or the other, and i certiantly don't see any user specific configuration. I have also
recompiled maildrop vmail/vmail is a trusted user and its the maildrop user, nothing helped at all. Right
now i'm just stuck and have spent all day on this, but this issue seems impossible to debug due to lack of
debugging stuff. i have resorted to looking through the maildrop source to try and figure this one out.

Basically you can see the difference here:

//when run as vmail
root <at> email:/etc/rc.d# su - vmail -c '/usr/bin/maildrop  -d edman007 <at> xxx.com -V 10'
maildrop: authlib: groupid=37
maildrop: authlib: userid=37
maildrop: authlib: logname=edman007 <at> xxx.com, home=/home/vmail/, mail=xxx.com/edman007/Maildir/
maildrop: Changing to /home/vmail
Subject: Test as non-root

Test
Message start at 0 bytes, envelope sender=root
maildrop: Attempting .mailfilter
maildrop: Delivering to ./Maildir
maildrop: Flock()ing ./Maildir.
maildrop: Appending to ./Maildir.
maildrop: Delivery complete.

//when run as root
root <at> email:/etc/rc.d# su - root -c '/usr/bin/maildrop  -d edman007 <at> xxx.com -V 10'
maildrop: authlib: groupid=37
maildrop: authlib: userid=37
maildrop: authlib: logname=edman007 <at> xxx.com, home=/home/vmail/, mail=xxx.com/edman007/Maildir/
maildrop: Changing to /home/vmail/
Subject: Test as root

Test
Message start at 0 bytes, envelope sender=edman007 <at> xxx.com
maildrop: Attempting .mailfilter
maildrop: Delivery complete.

the authtest output
vmail <at> email:~$ /usr/sbin/authtest edman007 <at> xxx.com
Authentication succeeded.

     Authenticated: edman007 <at> xxx.com  (uid 37, gid 37)
    Home Directory: /home/vmail/
           Maildir: xxx.com/edman007/Maildir/
             Quota: (none)
Encrypted Password: (none)
Cleartext Password: abc
           Options: (none)

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane