Debian Stretch上的Postfix 3.1.4似乎无法替换它试图用mysql_table解析的地址。
我配置了/etc/postfix/sasl/smtpd.conf(如下),但它从不进行身份验证。当我检查MySQL日志表时,我看到:
| 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
答案 0 :(得分:0)
似乎有效:select password from users where email = '%u@%r'
,但%s没有。