[Dovecot] Dovecot Deliver Problem
Trying to use the deliver utility and getting this error:
error: net_connect(/var/run/dovecot/auth-master) failed: No such file or directory
-- Marc Perkel - marc@perkel.com
Spam Filter: http://www.junkemailfilter.com My Blog: http://marc.perkel.com
Marc Perkel wrote:
Trying to use the deliver utility and getting this error:
error: net_connect(/var/run/dovecot/auth-master) failed: No such file or directory
You need to setup new auth socket in dovecot.conf, I forgot to document this on first time.
http://wiki.dovecot.org/moin.cgi/LDA#head-80d10da5bfd6056044c7e1bcf67ba4bd53...
-- Tomi Hakala
Tomi Hakala wrote:
Marc Perkel wrote:
Trying to use the deliver utility and getting this error:
error: net_connect(/var/run/dovecot/auth-master) failed: No such file or directory
You need to setup new auth socket in dovecot.conf, I forgot to document this on first time.
http://wiki.dovecot.org/moin.cgi/LDA#head-80d10da5bfd6056044c7e1bcf67ba4bd53...
Tomi, thanks for your fine job of documenting this.
hi all,
You need to setup new auth socket in dovecot.conf, I forgot to document this on first time.
http://wiki.dovecot.org/moin.cgi/LDA#head-80d10da5bfd6056044c7e1bcf67ba4bd53... 4c752
hi all,
i'm trying to get my Exim version 4.53 (snapshot)/ OSX 10.4.2 to route via a pipe to Dovecot's cvs-lda.
to that end, in exim.conf, per the Dovecot wiki, i've:
localuser:
driver = accept
domains = +local_domains
transport = dovecot_lda
dovecot_lda:
driver = pipe
command = /usr/local/dovecot/libexec/dovecot/deliver \
-c /var/Settings/Dovecot/dovecot-deliver.conf \
-d $local_part@$domain
message_prefix =
message_suffix =
delivery_date_add
envelope_to_add
return_path_add
log_output
user = mailuser
checking routing:
%exim -bt testuser@mydomain.com
testuser@mydomain.com
router = localuser, transport = dovecot_lda
looks ok.
an attempt at an actual delivery,
% exim -v -odf testuser@mydomain.com
test .
though, results in exim log reporting:
2005-09-12 23:17:30 IMQS51-0004XL-6D <= root@mydomain.com U=root P=local S=305
from root@mydomain.com for testuser@mydomain.com 2005-09-12 23:17:30 IMQS51-0004XL-6D == testuser@mydomain.com R=localuser T=dovecot_lda defer (0): Child process of dovecot_lda transport returned 75 (could mean temporary error) from command: /usr/local/dovecot/libexec/dovecot/deliver
this in my syslog,
Sep 12 23:17:30 server deliver:
net_connect(/var/Process/dovecot/auth-master.socket) failed: Connection refused
and nothing directly in my dovecot error log.
per _this_ thread, i've ensured in my dovecot.conf:
socket listen {
master { path = /var/Process/dovecot/auth-master.socket
mode = 666
}
}
and in dovecot-deliver.conf
auth_socket_path = /var/Process/dovecot/auth-master.socket
unlike Marc's earlier error of:
failed: No such file or directory
i _am_ finding the socket, but i'm getting the:
failed: Connection refused
permissions, perhaps? i've _got_ the socket set to 777 w/ mailuser:mailuser for testing ... to no avail.
any suggestions?
thx!
richard
Sep 12 23:17:30 server deliver: net_connect(/var/Process/dovecot/auth-master.socket) failed: Connection refused
AFAIK, this usually means that there is no process listening on that socket.
master { path = /var/Process/dovecot/auth-master.socket mode = 666
This is not sufficient, as dovecot will set the permissions of /var/Process/dovecot/ to 700 (given that this is your login_dir). So I put the socket into /var/spool/vmail, where the user that runs the lda has sufficient rights.
hi jakob,
thx for the reply =)
Sep 12 23:17:30 server deliver: net_connect(/var/Process/dovecot/auth-master.socket) failed: Connection refused
AFAIK, this usually means that there is no process listening on that socket.
master { path = /var/Process/dovecot/auth-master.socket mode = 666
This is not sufficient, as dovecot will set the permissions of /var/Process/dovecot/ to 700 (given that this is your login_dir). So I put the socket into /var/spool/vmail, where the user that runs the lda has sufficient rights.
ok.
with your comment about perms, i started looking into my Process dir a little deeper.
starting with a 'clean' env:
% cd /var/Process
% ls -al dovecot
/usr/local/bin/ls: dovecot: No such file or directory
and configs of:
**** dovecot.conf **** ... socket listen { master { path = /var/Process/dovecot/auth-master mode = 666 } } ... login_user = mailuser_login login_dir = /var/Process/dovecot/login ....
**** dovecot-deliver.conf **** .... auth_socket_path = /var/Process/dovecot/auth-master ....
starting dovecot immediately results in a couple of 'Warnings':
% /usr/local/dovecot/sbin/dovecot -c /var/Settings/Dovecot/dovecot.conf
Warning: Corrected permissions for base directory /var/Process/dovecot
Warning: Corrected permissions for login directory /var/Process/dovecot/login
and an original set of dir/file perms of:
% ls -alR dovecot dovecot: total 4 drwx------ 6 root wheel 204 Sep 13 10:11 . drwxrwxr-x 12 mailuser mailuser 408 Sep 13 10:11 .. srw------- 1 mailuser mailuser 0 Sep 13 10:11 auth-worker.14226 drwxr-x--- 3 root mailuser_login 102 Sep 13 10:11 login -rw------- 1 root wheel 6 Sep 13 10:11 master.pid -rw------- 1 root wheel 0 Sep 13 10:11 ssl-parameters.dat
dovecot/login:
total 0
drwxr-x--- 3 root mailuser_login 102 Sep 13 10:11 .
drwx------ 6 root wheel 204 Sep 13 10:11 ..
srw-rw---- 1 root mailuser_login 0 Sep 13 10:11 default
and, per the wiki:
"You could also use user = root to make sure that Exim has write access to the socket, but Exim doesn't allow delivery as root by default (this is a build time setting and there are good reasons for that). So set the socket owner and permissions so the user vmail has r/w access."
i've set my exim transport to use user:
dovecot_lda:
...
user = mailuser
so, QUESTIONS:
(1) where's "auth-master"?
this probly explains the:
Sep 13 10:20:30 devbox deliver: net_connect(/var/Process/dovecot/auth-master)
failed: Permission denied
(2) and WHICH permissions are the problem?
thx,
richard
OpenMacNews wrote:
and configs of:
**** dovecot.conf **** ... socket listen { master { path = /var/Process/dovecot/auth-master mode = 666 } } ... login_user = mailuser_login login_dir = /var/Process/dovecot/login ....
**** dovecot-deliver.conf **** .... auth_socket_path = /var/Process/dovecot/auth-master ....
starting dovecot immediately results in a couple of 'Warnings':
% /usr/local/dovecot/sbin/dovecot -c /var/Settings/Dovecot/dovecot.conf Warning: Corrected permissions for base directory
/var/Process/dovecot Warning: Corrected permissions for login directory /var/Process/dovecot/login
As I said, dovecot forces 700 permissions on the login directory at startup. To workaround that, change the path of your auth-master socket, e.g. to /var/run (or whatever suits in your OSX). Just make sure that the user the LDA runs as has at least r-x rights to this directory and its parents.
"You could also use user = root to make sure that Exim has write access
Yes, it's me who wrote that. :)
so, QUESTIONS: (1) where's "auth-master"?
Don't know. Are you sure you put this whole "socket listen" thing into an "auth" section ("auth default" if you only have one).
(2) and WHICH permissions are the problem?
As the socket should have been created with 0666, it can only be the directory permissions.
Here are the relevant parts of my dovecot.conf:
auth default { passdb passwd-file { args = /passwd }
userdb static { args = uid=103 gid=104 home=/var/spool/vmail/%Lu }
user = dovecot-auth chroot = /etc/dovecot
socket listen { master { path = /var/spool/vmail/auth-master mode = 0600 user = vmail group = vmail } }
}
and exim.conf:
dovecot_deliver: driver = pipe ... user = vmail
and dovecot-deliver.conf:
mail = maildir:%h/Maildir/ auth_socket_path = /var/spool/vmail/auth-master
hi jakob,
hmmm ... i'm gonna take this from the beginning. something's wrong in my setup.
Here are the relevant parts of my dovecot.conf:
this is helpful, thx.
QUESTION:
> auth default {
...
> user = dovecot-auth
is this ^^^^ user same/different than login_user?
what user are you running DOVECOT as? i presume 'vmail', yes?
thx,
richard
OpenMacNews wrote:
auth default { ... user = dovecot-auth is this ^^^^ user same/different than login_user?
No: login_user = dovecot
what user are you running DOVECOT as? i presume 'vmail', yes?
No. Well, which part of dovecot do you mean? The imap processes run as vmail, yes (as specified in userdb). dovecot-auth runs as "dovecot-auth", imap-login runs as "dovecot".
hi jakob, your advice abt moving the socket to a separate non-"login_dir" dir and ***parent*** was the trick ... not at all obvious for me, but with your help, this hurdle's crossed! thx, richard
participants (4)
-
Jakob Hirsch
-
Marc Perkel
-
OpenMacNews
-
Tomi Hakala