[Dovecot] sql : uid, gid, home ignored ?

Eric Diaz Fernandez eric.diaz at skynet.be
Sat Jan 29 13:26:55 EET 2011


Hello,

I'm trying to setup a dovecot imap server.

version is 2.0.9
I've setup a mysql database using:

user_query = \
     SELECT home, uid, gid, home as userdb_home, uid as userdb_uid, gid as userdb_gid, \
     FROM user WHERE username = '%n' AND domain = '%d' AND active = 'Y'

password_query = \
     SELECT username AS user, password, home as userdb_home, uid as userdb_uid, gid as userdb_gid, home, uid, gid \
     FROM user WHERE username = '%n' AND domain = '%d' AND active ='Y'

(I get the information with and without the userdb_ prefix since I was not sure what was needed)

When I login, I see the password_query in the debug log and it says:

client out: OK 1 user=theuser home=/home/theuser uid=1000 gid=1000
master in: REQUEST 547880961 10068 1 e6...(hexadecimal stuff)
master out: USER 547880961 theuser

But in the mail.err log i see:
dovecot: imap(theuser): Error: user theuser: Couldn't drop privileges: User is missing UID (see mail_uid setting)
dovecot: imap(theuser): Error: Internal error occurred.  Refer to server log for more information.

The same two lines are also displayed in mail.info and mail.log

Further testing (setting mail_uid & mail_gid to a nobody) shown that the home setting was ignored too.

The sql example says that uid and gid are supposed to be an override of the mail_uid and mail_gid settings.
Any idea of why the columns are ignored ?

Thanks in advance,


Eric



More information about the dovecot mailing list