What "%{user | username}" means ? %user or %username ?

On 2025-02-15 23:39, Ken Wright via dovecot wrote:

On Sat, 2025-02-15 at 08:59 +0200, Timo Sirainen wrote: On 15. Feb 2025, at 0.06, Ken Wright via dovecot
<dovecot@dovecot.org> wrote:
driver = mysql
connect = host=localhost dbname=postfixadmin user=postfixadmin
password=hidden
userdb_default_password_scheme = ARGON2I
password_query = SELECT username AS username, password FROM mailbox
WHERE username = '%{user | username }' AND active= '1'
user_query = SELECT maildir, 2000 AS uid, 2000 AS gid FROM mailbox
WHERE username = '%{user | username }' AND active= '1'
iterate_query = SELECT username AS username FROM mailbox
These need to be converted to the new syntax.
 Is this correct?

passdb sql {
  query = SELECT username AS username, domain, password FROM mailbox
WHERE username = '%{user | username}' AND domain = '%{user | domain}'
AND active= '1'
  }
userdb sql {
  query = SELECT maildir, 2000 AS uid, 2000 AS gid FROM mailbox WHERE
username = '%{user | username}' AND domain = '%{user | domain}' AND
active= '1'
  # For using doveadm -A:
  iterate_query = SELECT username AS username, domain FROM mailbox

Ken
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to