我正在运行一台运行 Exim 的 ubuntu 服务器(我被说服了,没有一天我不后悔!)。在拆分配置的 ACL 文件深处,我发现了以下内容:
# This hook allows you to hook in your own ACLs without having to
# modify this file. If you do it like we suggest, you'll end up with
# a small performance penalty since there is an additional file being
# accessed. This doesn't happen if you leave the macro unset.
.ifdef CHECK_RCPT_LOCAL_ACL_FILE
.include CHECK_RCPT_LOCAL_ACL_FILE
.endif
搜索CHECK_RCPT_LOCAL_ACL_FILE
会产生很多这样的节,但它没有告诉你在哪里在哪里创建变量或者文件应该是什么样子。后者应该是显而易见的,因为它只包含更多 ACL 命令。然而,前者是一个谜……有人知道吗?
我确实尝试在ask.ubuntu上问这个问题,但像往常一样什么也没得到……
请注意,以下节在conf.d/acl/30_exim4-config_check_rcpt
文件中运行得很好,但是像这样修改系统文件将在下次 Ubuntu 决定更新时导致麻烦......
deny
condition = ${lookup{$local_part}nwildlsearch{/etc/exim4/black.list}{yes}{no}}
logwrite = :main,reject: $sender_host_address - $local_part@$domain is only used by spammers
message = User is black listed. Go away.
答案1
您需要将此 ACL 添加到文件中/etc/exim4/include/check_rcpt_local_acl
这对我来说是工作。