iterate_query with static userdb ?
Hi,
Going by the "static userdb" example on this page (https://wiki.dovecot.org/VirtualUsers#homedirs), tried to achieve a similar setup in conjunction with pgsql for passdb.
However I get an error "auth: Warning: sql: Ignoring changed iterate_query in /etc/dovecot/local_sql_users.conf, because userdb sql not used. (If this is intentional, set userdb_warning_disable=yes)"
Does this mean the following is not a valid config ? Or at least I will not be able to achieve iteration ?
mail_location = maildir:/foobar/mail/%d/%n/Maildir passdb { driver = sql args = /etc/dovecot/local_sql_users.conf } userdb { driver = static args = uid=foo gid=bar home=/foobar/mail/%d/%n }
On Sunday, 17 May 2020 10:38, Aki Tuomi aki.tuomi@open-xchange.com wrote:
On 17/05/2020 12:34 Laura Smith n5d9xq3ti233xiyif2vp@protonmail.ch wrote:
Hi,
Going by the "static userdb" example on this page (https://wiki.dovecot.org/VirtualUsers#homedirs), tried to achieve a similar setup in conjunction with pgsql for passdb.
However I get an error "auth: Warning: sql: Ignoring changed iterate_query in /etc/dovecot/local_sql_users.conf, because userdb sql not used. (If this is intentional, set userdb_warning_disable=yes)"
Does this mean the following is not a valid config ? Or at least I will not be able to achieve iteration ?
mail_location = maildir:/foobar/mail/%d/%n/Maildir passdb { driver = sql args = /etc/dovecot/local_sql_users.conf } userdb { driver = static args = uid=foo gid=bar home=/foobar/mail/%d/%n }
It's valid but why do it like this? You can return these fields with user_query in the sql config.
Aki
Aki Tuomi
Because I wanted to avoid storing uid/gid/home in the database ?
On 17/05/2020 10:43, Laura Smith wrote:
Because I wanted to avoid storing uid/gid/home in the database ?
I use:
user_query = "SELECT 'vmail' AS uid, 'vmail' AS gid, allow_nets, '*:storage=' || quota || 'M' AS quota_rule FROM mailbox WHERE username = '%n' AND domain = '%d';"
... uid and gid are not stored in my database but are returned by the query.
On Sunday, 17 May 2020 11:11, James list@xdrv.co.uk wrote:
On 17/05/2020 10:43, Laura Smith wrote:
Because I wanted to avoid storing uid/gid/home in the database ?
I use:
user_query = "SELECT 'vmail' AS uid, 'vmail' AS gid, allow_nets, '*:storage=' || quota || 'M' AS quota_rule FROM mailbox WHERE username = '%n' AND domain = '%d';"
... uid and gid are not stored in my database but are returned by the query.
Thanks !
participants (3)
-
Aki Tuomi
-
James
-
Laura Smith