我有一个围绕 ISPMail 指南松散设置的电子邮件系统 - https://workaround.org/ispmail/buster/
我正在尝试为自动密码方案迁移设置脚本,但遇到了问题。我一直在遵循与此类似的指南:https ://wiki.dovecot.org/HowTo/ConvertPasswordSchemes
每当我启用 userdb 预取时,都会Couldn't drop privileges: User is missing UID (see mail_uid setting)
出现错误。
我的 user_query 和 password_query 如下:
user_query = SELECT user, \
concat('*:bytes=', quota) AS quota_rule, \
'/var/vmail/%d/%n' AS home, \
5000 AS uid, 5000 AS gid \
FROM users WHERE user='%u';
password_query = SELECT user, password, \
'%w' AS userdb_plain_pass, \
concat('*:bytes=', quota) AS quota_rule, \
'/var/vmail/%d/%n' AS home, \
5000 AS uid, 5000 AS gid \
FROM users WHERE user='%u';
我有以下配置:(按此顺序)
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
driver = prefetch
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
查看调试日志,当我删除预取并且一切都按预期工作时:
Jan 5 15:21:38 m1 dovecot: auth: Debug: master userdb out: USER#0114090494977#[email protected]#011plain_pass=Password1234#011quota_rule=*:bytes=0#011home=/var/vmail/example.com/aaron#011uid=5000#011gid=5000#011auth_token=bdxxxxx
但是,启用预取时,它不会获取 passdb 中的 uid 和 gid:
Jan 5 15:18:36 m1 dovecot: auth: Debug: master userdb out: USER#0113382444033#[email protected]#011plain_pass=Password1234#011auth_token=bdxxxx
关于使用预取时如何解决此问题的任何建议?
谢谢!