我在 Debian Bullseye 上安装了 Exim4,身份验证使用纯文本/saslauthd。我想在本地主机上添加一些“服务帐户”电子邮件,我相信最简单的方法是将这些帐户添加到密码文件中,但我很难配置身份验证器。
/etc/exim4/密码
auth:{md5}$1$RXXXXXgJ$JXQLAxVcniEpMr04CRpar/ # generated with 'mkpasswd -5 -s'
/etc/exim4/exim4.conf.模板
begin authenticators
plain_server:
driver = plaintext
public_name = PLAIN_LOCAL
server_condition = "${if crypteq{$auth3}{${extract{1}{:}{${lookup{$auth2}lsearch{CONFDIR/passwd}{$value}{*:*}}}}}{1}{0}}"
server_set_id = $auth2
server_prompts = :
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_in_cipher}{}{}{*}}
.endif
(这不起作用,因为我已经有一个 PLAIN 身份验证器,如下所示)
plain_saslauthd_server:
driver = plaintext
public_name = PLAIN
server_condition = ${if saslauthd{{$auth2}{$auth3}}{1}{0}}
server_set_id = $auth2
server_prompts = :
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_in_cipher}{}{}{*}}
.endif
这里,我觉得应该在server_condition中添加一个条件:
server_condition = ${if eq {$sender_host_address}{127.0.0.1}
{${if crypteq{$auth3}{${extract{1}{:}{${lookup{$auth2}lsearch{CONFDIR/passwd}{$value}{*:*}}}}}{1}{0}}}
{${if saslauthd{{$auth2}{$auth3}}{1}{0}}}
}
但是 update-exim4.conf --check 失败,在 server_condition 的第 2 行出现错误“预期选项设置”...我做错了什么?