# Dovecot/Postfix with MySQL

## xenobyte

Hi there, I'm running a Postfix/Dovecot combination with mysql after this guide here: http://en.gentoo-wiki.com/wiki/Mail_server_using_Postfix_and_Dovecot

Installation went fine so far, but I'm not able to login. First of all Dovecot was complaining about this 

```

2012-10-12T13:30:40.330320+02:00 t3227 dovecot: auth-worker(27440): Error: sql(xenobyte@domain.com,88.888.888.88): Password query failed: Table 'mailsql.users' doesn't exist (using built-in default password_query: SELECT username, domain, password FROM users WHERE username = '%n' AND domain = '%d') 

```

(Please note, that I changed my real domain and ip-adress)

so... the table "users" doesn't exist, so I set "password_query" in /etc/dovecot/dovecot-sql.conf.ext to "SELECT password FROM mailbox WHERE username = '%n'

If I try to login with imap, there is this in /var/log/maillog

```

2012-10-12T14:00:41.202515+02:00 t3227 dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=31.187.111.45, lip=18.254.5.76, session=<S8DSb9vLKgBQu28t> 

```

(Please note. that user=<> is empty)  

this works a bit better with pop3

```

2012-10-12T14:52:17.328170+02:00 t3227 dovecot: pop3-login: Disconnected (auth failed, 1 attempts in 4 secs): user=<xenobyte@domain.com>, method=PLAIN, rip=81.44.11.21, lip=18.254.5.76, TLS: Disconnected, session=<hPsiKNzLgwBQu28V>

```

 but I still can't login

Is anyone able to help?

----------

## cach0rr0

among the things i dont see on that wiki page, is any mention of the need to emerge postfix with USE="dovecot-sasl"

beyond that i dont have too much to suggest, as I'm not hugely keen on how that guide recommends setting things up - especially for those who *dont* need "virtual" users, dont need postfixadmin, etc. It also tells you absolutely nothing of the setup of dovecot itself, only the few pieces (supposedly) required to make postfix talk to dovecot.

----------

