我正在使用 exim 发送邮件。对于经过 SMTP 身份验证的用户,我已经添加了几个 ACL,并希望添加另一个允许后缀别名的 ACL。后缀别名是电子邮件地址,例如“[email protected]”。
环境如下所示:
- 用户名(完整的电子邮件地址)存储在
$authenticated_id
- 设置的 FROM 地址存储在
$sender_address
- “[email protected]”中的“用户”可以在
${local_part:$authenticated_id}
- 认证用户的域名在
${domain:$authenticated_id}
现在我想实现如下所示的 ACL 规则:
# accept if FROM address is a suffix alias of authenticated address
accept
condition = ${if match {$sender_address} {${local_part:$authenticated_id}+{*}@${domain:$authenticated_id}} }
logwrite = AUTH OK - FROM address $sender_address is a suffix alias of authenticated user
不幸的是,ACL 规则似乎不正确。我收到以下错误消息:
failed to expand ACL string "${if match {$sender_address} {${local_part:$authenticated_id}+{*}@${domain:$authenticated_id}} }": curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
问:上述条件有什么问题,实现这一点的正确条件应该是什么样的?