[Dovecot] Using deliver with postfix
Hi, I'm trying to set up dovecot 1.1.2 and postfix 2.5.4 on freebsd 7.0. I'm getting permissions problems on auth-master and I'm not sure of the correct settings to use.
In postfix's main.cf I have mailbox_command=/usr/local/libexec/dovecot/deliver -d $USER
In dovecot.conf I have: socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = dovecot group = postfix } ...
# ls -l /var/run/dovecot/auth-master srw-rw---- 1 dovecot postfix 0 Sep 18 18:26 /var/run/dovecot/auth-master=
In maillog I'm getting: deliver(sumbuddy): Can't connect to auth server at /var/run/dovecot//auth-master: Permission denied (I'm not sure where it's getting the "//" in the path either ...)
Also I'm confused about whether I need the postfix options: maildrop_destination_recipient_limit=1 dovecot_destination_concurrency_limit=1 or even whether these are current options in my version of postfix (they don't appear in main.cf.default) Does deliver require such limits on concurrency or # of recipients?
Thanks!! Rich
Rich Winkel wrote:
Hi, I'm trying to set up dovecot 1.1.2 and postfix 2.5.4 on freebsd 7.0. I'm getting permissions problems on auth-master and I'm not sure of the correct settings to use.
In postfix's main.cf I have mailbox_command=/usr/local/libexec/dovecot/deliver -d $USER
In dovecot.conf I have: socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = dovecot group = postfix } ...
leave the master as it was and add a client for postfix:
client {
path = /var/spool/postfix/private/dovecot
mode = 0660
user = postfix
group = postfix
}
then configure your postfix to use private/dovecot
# ls -l /var/run/dovecot/auth-master srw-rw---- 1 dovecot postfix 0 Sep 18 18:26 /var/run/dovecot/auth-master=
In maillog I'm getting: deliver(sumbuddy): Can't connect to auth server at /var/run/dovecot//auth-master: Permission denied (I'm not sure where it's getting the "//" in the path either ...)
Also I'm confused about whether I need the postfix options: maildrop_destination_recipient_limit=1 dovecot_destination_concurrency_limit=1
Assuling "dovecot" is the name of the corresponsing transport in master.cf, use dovecot_destination_recipient_limit = 1
or even whether these are current options in my version of postfix (they don't appear in main.cf.default)
they won't even appear in postconf output. Unlike most postfix parameters, these have a "free" prefix. if you have a transport named FOOBAR in master.cf, you can use FOOBAR_destination_recipient_limit in main.cf.
Does deliver require such limits on concurrency or # of recipients?
when delivering mail to a mailbox with a command, you need to pass one recipient at a time. This is because if delivery fails for one recipient and succeeds for another, the command has no way to tell postfix about this (you need LMTP for such a functionality). so the choice is between: saying "OK" and losing mail for one recipient, or saying "not ok" and delivering multiple copies to the other.
Thanks for your help mouss!
On Fri, Sep 19, 2008 at 10:22:40AM +0200, mouss wrote:
Rich Winkel wrote:
Hi, I'm trying to set up dovecot 1.1.2 and postfix 2.5.4 on freebsd 7.0. I'm getting permissions problems on auth-master and I'm not sure of the correct settings to use.
In postfix's main.cf I have mailbox_command=/usr/local/libexec/dovecot/deliver -d $USER
In dovecot.conf I have: socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = dovecot group = postfix } leave the master as it was and add a client for postfix: client { path = /var/spool/postfix/private/dovecot mode = 0660 user = postfix group = postfix }
I'm confused. So deliver doesn't need access to the master socket? Because it uses the master (not the client) in the default setup ...
Also how does this differ in terms of permissions from my current setup? In both cases you would have group postfix rw perms on the socket. And looking at the docs, I'm doubly confused! It says mailbox_command runs with the userid of the recipient. So how is it supposed to access this socket in any case? I take it I don't want to give 666 perms to the socket ...
Sorry for my ignorance ...
Rich
Rich Winkel wrote:
Thanks for your help mouss!
On Fri, Sep 19, 2008 at 10:22:40AM +0200, mouss wrote:
Rich Winkel wrote:
Hi, I'm trying to set up dovecot 1.1.2 and postfix 2.5.4 on freebsd 7.0. I'm getting permissions problems on auth-master and I'm not sure of the correct settings to use.
In postfix's main.cf I have mailbox_command=/usr/local/libexec/dovecot/deliver -d $USER
In dovecot.conf I have: socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = dovecot group = postfix } leave the master as it was and add a client for postfix: client { path = /var/spool/postfix/private/dovecot mode = 0660 user = postfix group = postfix }
I'm confused. So deliver doesn't need access to the master socket? Because it uses the master (not the client) in the default setup ...
oops. ignore my garbage. for some reason, I thought your problem with dovecot auth. Now that I reread your post, I don't see where I got that!
in your case, see the "Multiple UIDs" section in http://wiki.dovecot.org/LDA (you need setuid...).
Also how does this differ in terms of permissions from my current setup? In both cases you would have group postfix rw perms on the socket. And looking at the docs, I'm doubly confused! It says mailbox_command runs with the userid of the recipient. So how is it supposed to access this socket in any case? I take it I don't want to give 666 perms to the socket ...
Sorry for my ignorance ...
Rich
On Sat, Sep 20, 2008 at 05:47:26AM +0200, mouss wrote:
in your case, see the "Multiple UIDs" section in http://wiki.dovecot.org/LDA (you need setuid...).
I'm sorry, I'm still having trouble...
"/usr/local/libexec/dovecot/postfix/deliver -d ${USER}". Command output:
/usr/local/libexec/dovecot/postfix/deliver: Permission denied
#ls -la /usr/local/libexec/dovecot/postfix/ drwx------ 2 postfix postfix 512 Sep 24 16:07 ./ drwxr-xr-x 3 root wheel 512 Sep 24 16:07 ../ -r-sr-sr-x 1 root postfix 676396 Sep 24 16:07 deliver*
The postfix documentation says the delivery agent is run under the recipient's ID, so I can see why there's a permissions problem. If I don't specify -d it doesn't access auth-master, so I can run it without setuid or permissions issues, but will there other problems?
Thanks! Rich
participants (2)
-
mouss
-
Rich Winkel