[Dovecot] Something weird happening...
Roderick A. Anderson
raanders at acm.org
Wed Oct 8 22:49:09 EEST 2008
Timo Sirainen wrote:
> On Wed, 2008-10-08 at 11:12 +0200, Claudio Prono wrote:
>> Very strange, i have tryied to chmod 666 all log files, like that:
>>
>> -rw-rw-rw- 1 root root 681 Oct 8 11:08 dovecot-err.log
>> -rw-rw-rw- 1 root root 1039 Oct 8 11:02 dovecot-inf.log
>>
>> (Is terrible i know, but only a test)
>>
>> Now i have another error (written in log of dovecot!)
>>
>> deliver(mediatest at atpss.net): Oct 08 11:08:20 Error: Can't connect to
>> auth server at /var/run/dovecot/auth-master: Permission denied
>>
>> Seems all a problem of user running dovecot...is not root? Dunno why...
>> In config there isn't nothing to do so.
>
> deliver isn't normally run as root, unless you've made it setuid-root.
> So the log files and the auth-master socket need to be writable by the
> user who runs deliver (as defined in Postfix's master.cf).
>
> (Of course the user running deliver also needs to have access to all
> users' mails. If you're using system users you'll need to make deliver
> setuid-root.)
Since I just went through this I can offer these settings that worked
for me for virtual domains.
In dovecot.conf
log_path = /var/log/dovecot/dovecot.log
info_log_path = /var/log/dovecot/dovecot-info.log
protocol lda {
log_path = /var/log/dovecot/dovecot-deliver.log
...
}
auth default {
...
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = vmail
}
}
In /etc/postfix/master.cf
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver
-f ${sender} -d ${recipient}
And these file and directory ownership and permissions.
/var/log
drwxrwx--- 2 root vmail 4096 Oct 7 07:41 dovecot
/var/log/dovecot
-rw-rw---- 1 root vmail 1658 Oct 8 12:32 dovecot-deliver.log
-rw-rw---- 1 root vmail 6572 Oct 8 12:35 dovecot-info.log
-rw-rw---- 1 root vmail 448 Oct 8 12:35 dovecot.log
This on a CentOS 5 system (running in a Linux-Vserver guest -- not that
that makes a difference) using the additional Yum repositories: rpmforge
and atrpms.
The cheap trick I used until I had it all working was to just log to
maillog using syslog.
HTH,
Rod
--
More information about the dovecot
mailing list