[Dovecot] dovecot v-2.0, postfix+mysql configuration issue.
Vimuth
vimuthd at gmail.com
Thu Mar 28 10:28:08 EET 2013
Thank you very much for replying Mr Oli. Ummm Im confused. Could you please
kindly mention as to how I should mention the user query? If I may speak
though following are the mysql statements I used to create the tables n
etc..
GRANT SELECT ON mailserver.*
TO 'mailuser'@'127.0.0.1'
IDENTIFIED BY 'mailuser2011';
CREATE TABLE `virtual_domains` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `virtual_users` (
`id` int(11) NOT NULL auto_increment,
`domain_id` int(11) NOT NULL,
`password` varchar(32) NOT NULL,
`email` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `virtual_aliases` (
`id` int(11) NOT NULL auto_increment,
`domain_id` int(11) NOT NULL,
`source` varchar(100) NOT NULL,
`destination` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
But in that dovecot link you've sent me mention of a home that my db doesnt
know about.
SELECT home, uid, gid FROM users WHERE userid = '%n' AND domain = '%d'
Please help sir.
This is just a general question. if at all possible could you please point
me to a good working guide related to this whole attempt. Thats is
"postfix+dovecot-2.0+mysql+TLS" ? I'm yet to find a good source in order to
get there.Problem is whatever you find is postfix with dovecot1.X
implementation.
thanks and Regards
On Thu, Mar 28, 2013 at 12:55 PM, Oli Schacher <dovecot at lists.wgwh.ch>wrote:
> On Thu, 28 Mar 2013 11:48:42 +0530
> Vimuth <vimuthd at gmail.com> wrote:
>
> > 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')
> >
> >
>
> > here's *"/etc/dovecot/dovecot-sql.conf.ext"*
> >
>
> >driver = mysql
> >connect = host=127.0.0.1 dbname=mailserver user=mailuser
> >password=redhat
> >default_pass_scheme = MD5
> >password_query = SELECT email as user, password FROM virtual_users
> >WHERE
> >email='%u';
>
> looks like the "user_query" is missing in this file and therefore
> dovecot uses a builtin query which uses a different table name
>
> http://wiki2.dovecot.org/AuthDatabase/SQL
>
>
>
More information about the dovecot
mailing list