diff --git a/dovecot/conf/dovecot-sql.conf.ext b/dovecot/conf/dovecot-sql.conf.ext index e342d4c5..71edb9f4 100644 --- a/dovecot/conf/dovecot-sql.conf.ext +++ b/dovecot/conf/dovecot-sql.conf.ext @@ -4,13 +4,13 @@ connect = /data/freeposte.db # Return the user hashed password password_query = \ SELECT password \ - FROM user INNER JOIN domain ON user.domain_id = domain.id \ - WHERE domain.name = '%d' \ + FROM user \ + WHERE user.domain_name = '%d' \ AND user.username = '%n' # Mostly get the user quota user_query = \ SELECT '*:bytes=' || user.quota_bytes AS quota_rule \ - FROM user INNER JOIN domain ON user.domain_id = domain.id \ - WHERE domain.name = '%d' \ + FROM user \ + WHERE user.domain_name = '%d' \ AND user.username = '%n' diff --git a/postfix/conf/sqlite-virtual_alias_maps.cf b/postfix/conf/sqlite-virtual_alias_maps.cf index f178f496..7c7f28f6 100644 --- a/postfix/conf/sqlite-virtual_alias_maps.cf +++ b/postfix/conf/sqlite-virtual_alias_maps.cf @@ -1,6 +1,6 @@ dbpath = /data/freeposte.db query = SELECT destination - FROM alias INNER JOIN domain ON alias.domain_id = domain.id - WHERE domain.name = '%d' + FROM alias + WHERE alias.domain_name = '%d' AND alias.localpart = '%u'