[Dovecot] need help with dovecot-lda

Andreas Meyer anmeyer at anup.de
Sat Dec 15 15:12:29 EET 2012


Hello!

> > I already added
> > 
> > service auth {
> >     unix_listener auth-userdb {
> >       mode = 0600
> >       user = vmail # User running dovecot-lda
> >       group = vmail # Or alternatively mode 0660 + dovecot-lda user in
> >       this group
> 
> You're supposed to understand the comments and then remove them, not
> copy them blindly without reading them.

That's ok, I'll remove the comments. But there is no auth-userdb socket
in the sockets directtory of dovecot.

> >     }
> > }
> > 
> > to the dovecot.conf.
> 
> Well, that looks OK to me; but the only way to test it is to manually
> run dovecot-lda as vmail. Is there an auth-userdb socket in your dovecot
> sockets directory? Does it have the right permissions?

No, no such socket in /var/run/dovecot

# ll
insgesamt 4
srwxrwxrwx 1 root root       0  8. Jun 2012  dict-server
drwxr-x--- 2 root dovecot 4096 22. Jun 19:58 login
 
> > How does dovecot know there is a socket in
> > /var/spool/postfix/private/dovecot? And how does dovecot-lda know to
> > look there. Am I missunderstanding something?
> 
> Yes, you are misunderstanding something. It works (something) like this:
> 
>     - A mail comes in to Postfix.
>     - Postfix decides this mail is local.
>     - Postfix sends the mail through /var/spool/postfix/private/dovecot
>       to a Postfix pipe(8) process on the other end.
>     - That pipe(8) process runs dovecot-lda, as the vmail user.
>     - dovecot-lda reads dovecot.conf.
>     - dovecot-lda contacts the Dovecot auth process using the
>       auth-userdb socket.
>     - If the user exists, it delivers the mail to their mailbox.
> 
> No Dovecot process needs to know anything at all about the Postfix
> socket, it's just for internal communication between different bits of
> Postfix. Have you read the Postfix documentation?

Thank you for that explanation!

> > I am lost. I don't if the mail is handed over to dovecot-lda and if so
> > why it can't find the passwd-file.
> 
> If the mail was handed over to dovecot-lda, it ought to be logging
> *something*. Find out where those logs should go; if they aren't
> appearing, you need to fix that. Syslog is IMHO a better bet than custom
> log files.

I have a dovecot-lda-errors.log and a dovecot-lda.log

# cat dovecot-lda-errors.log
Dec 14 23:28:20 lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
Dec 14 23:28:20 lda: Fatal: Internal error occurred. Refer to server log for more information.

# echo "foo" | /usr/libexec/dovecot/dovecot-lda -f anmeyer at anup.de -d anmeyer at anup.de

# cat dovecot-lda.log
Dec 14 21:04:07 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 14 21:16:46 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 14 21:18:25 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 14 21:20:44 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 14 21:58:13 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 10:14:50 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 10:14:59 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 10:24:19 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 10:24:27 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 11:14:58 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 11:26:01 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 11:26:11 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'
Dec 15 14:07:40 lda(anmeyer at anup.de): Info: sieve: msgid=unspecified: stored mail into mailbox 'INBOX'

So the question is how do I get this auth-userdb socket?

> 
> Ben
> 

Andreas



More information about the dovecot mailing list