[Dovecot] dovecot v-2.0, postfix+mysql configuration issue.

Daniel Luttermann daniel at dlutt.de
Fri Mar 29 17:45:16 EET 2013

On 2013-03-28, Vimuth wrote:

> echo test | mail vimuth at mydomain.rock

> [root at box1 ~]# tail -f /var/log/maillog
> Mar 26 07:00:44 box1 dovecot: auth: Error: sql(vimuth at mydomain.rock): User
> query failed: Table 'mailserver.users' doesn't exist (using built-in
> default user_query: SELECT home, uid, gid FROM users WHERE username = '%n'
> AND domain = '%d')
> Mar 26 07:00:44 box1 dovecot: lda: Error: user vimuth at mydomain.rock: Auth
> USER lookup failed
> Mar 26 07:00:44 box1 dovecot: lda: Fatal: Internal error occurred. Refer to
> server log for more information.

Dovecot needs to know if the user exists and where the mails should be
saved. You can use a dedicated user lookup query like

  SELECT home, uid, gid FROM users WHERE userid = '%u'

or you can use a static userdb. See:

But it's also possible to combine passdb and userdb into a single
lookup. This is explained here: http://wiki2.dovecot.org/UserDatabase/Prefetch

Because you're using virtual users you'll find other useful
informations here: http://wiki2.dovecot.org/VirtualUsers

I guess you could start with a static userdb like

userdb {
  driver = static
  args = uid=vmail gid=vmail home=/var/mail/%d/%n

In this example, mails are saved in /var/mail/domain/username.


More information about the dovecot mailing list