Example records for SQL AUTH
deoren
dovecot-mailing-list at whyaskwhy.org
Tue Nov 4 15:57:07 UTC 2014
On 11/3/2014 4:29 PM, Jorge Bastos wrote:
> Hi,
>
>
>
> Where can I get examples for the records for the "users" table?
If I understand your question properly and you're looking for examples
of creating new virtual users, then this guide covers that:
https://www.linode.com/docs/email/email-with-postfix-dovecot-and-mysql
You would have to adjust to fit your chosen schema of course as theirs
is a much simpler setup that excludes the uid, gid, and home values.
>
> For SHA512-CRYPT, I tried:
>
>
>
> replace into users values ('a at a.com','a.com',ENCRYPT('b', CONCAT('$6$',
> SUBSTRING(SHA(RAND()), -16))),'',0,0,'true');
>
>
>
> schema is:
>
> CREATE TABLE `users` (
>
> `username` varchar(255) NOT NULL,
>
> `domain` varchar(255) NOT NULL,
>
> `password` varchar(255) NOT NULL,
>
> `home` varchar(255) NOT NULL,
>
> `uid` int(11) NOT NULL,
>
> `gid` int(11) NOT NULL,
>
> `active` enum('true','false') NOT NULL DEFAULT 'true',
>
> PRIMARY KEY (`username`)
>
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8
>
>
>
> Password_query:
>
> password_query = select username, domain,password from users where
> username='%u' and domain='%d' and active='true'
What does your auth-sql-conf.ext file look like? With as much
information as you already have in your database schema you may want to
look at using the Prefetch userdb.
http://wiki2.dovecot.org/UserDatabase/Prefetch
P.S.
Apologies for the duplication. I forgot to reply to the list with my
last response.
More information about the dovecot
mailing list