后缀未替换 %s
postfix not substituting %s
Debian Stretch 上的 Postfix 3.1.4 似乎无法用 mysql_table.
替换它试图解析的地址
我配置了 /etc/postfix/sasl/smtpd.conf(如下),但它从不进行身份验证。当我检查 MySQL 日志 table 时,我看到:
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | START TRANSACTION |
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | SELECT password FROM mailbox WHERE username = '%s' |
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | SELECT password FROM mailbox WHERE username = '%s' |
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | COMMIT
当 %s
是后缀模板,而不是 MySQL / MariaDB 模板时。它应该填写电子邮件地址,或者这里的用户,但它似乎只是从配置中逐字复制。
这里是 /etc/postfix/sasl/smtpd.conf 的内容:
autheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_hostnames: 127.0.0.1
sql_user: [redacted]
sql_passwd: [redacted]
sql_database: [redacted]
sql_select: SELECT password FROM mailbox WHERE username = '%s'
log_level:10
这似乎有效:select password from users where email = '%u@%r'
,但 %s 无效。
Debian Stretch 上的 Postfix 3.1.4 似乎无法用 mysql_table.
替换它试图解析的地址我配置了 /etc/postfix/sasl/smtpd.conf(如下),但它从不进行身份验证。当我检查 MySQL 日志 table 时,我看到:
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | START TRANSACTION |
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | SELECT password FROM mailbox WHERE username = '%s' |
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | SELECT password FROM mailbox WHERE username = '%s' |
| 2017-08-28 23:19:54 | postfix[postfix] @ localhost [127.0.0.1] | 834 | 0 | Query | COMMIT
当 %s
是后缀模板,而不是 MySQL / MariaDB 模板时。它应该填写电子邮件地址,或者这里的用户,但它似乎只是从配置中逐字复制。
这里是 /etc/postfix/sasl/smtpd.conf 的内容:
autheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_hostnames: 127.0.0.1
sql_user: [redacted]
sql_passwd: [redacted]
sql_database: [redacted]
sql_select: SELECT password FROM mailbox WHERE username = '%s'
log_level:10
这似乎有效:select password from users where email = '%u@%r'
,但 %s 无效。