Updated dovecot configuration.

This commit is contained in:
Alexis Lahouze 2011-06-04 14:45:20 +00:00
parent 63c1249420
commit 53c24001bc
1 changed files with 5 additions and 5 deletions

View File

@ -117,15 +117,15 @@ default_pass_scheme = MD5
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
user_query = \
SELECT path AS home, 33 AS uid, mail_users.uid AS gid \
FROM mail_users WHERE alias = '%u'
SELECT concat(concat(%%ALTERNC_LOC%%, '/'), mailbox.path) AS home, domaines.compte AS uid, domaines.compte AS gid \
FROM mailbox JOIN address ON address.id = mailbox.address_id JOIN domaines on domaines.id = address.domain_id WHERE '%u' IN (address.address, replace(address.address, '@', '_'))
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example:
password_query = \
SELECT alias AS user, password, \
path AS userdb_home, 33 AS userdb_uid, uid AS userdb_gid \
FROM mail_users WHERE alias = '%u'
SELECT '%u' AS user, address.password, \
concat(concat(%%ALTERNC_LOC%%, '/'), mailbox.path) AS userdb_home, domaines.compte AS userdb_uid, domaines.compte AS userdb_gid \
FROM mailbox JOIN address ON address.id = mailbox.address_id JOIN domaines on domaines.id = address.domain_id WHERE '%u' IN (address.address, replace(address.address, '@', '_'))