Exim提供了使用exim -bh通过CLItestingACL的选项。 但是,此方法打开SMTP连接,您只能testingSMTP ACL。 我希望debugging和testingacl_not_smtp ACL – 是否有任何类似的方式做到这一点?
或者,如果有人知道为什么这不起作用在acl_not_smtp:
deny message = Outgoing email is blocked for this domain. Please contact support for assistance. senders = /etc/exim_blacklist_users
这将是非常有益的。 这在acl_smtp_rcpt中有效。
Exim没有本地testing模式,即-bh模式模拟smtp连接的方式。 所以你必须用真正的信息来做。
我会创build一个带有完整标题和正文“sample.eml”的示例消息。 将其设置为您所控制的地址,testing邮箱或其他内容。 从你想要的地址拒绝。 使用简单的命令行将消息传递给Exim:
# No real output exim -bm -t < "sample.eml" # Get verbose output, but still not much exim -v -bm -t < "sample.eml" # Here's where we figure things out: debug exim -d+all -bm -t < "sample.eml"
最后一个会产生很多输出,所以可能会redirect到一个文本文件并查看该文件。 看看它处理这个消息时是如何处理非smtp acl的。 你会在那里find答案。 或者使用该ACL的debugging输出更新问题,我们将优化我们的答案。
另一个select是将正在发送这些消息的应用程序configuration为使用SMTP发送到127.0.0.1端口25,而不是将消息传递给/ usr / sbin / sendmail(这是exim的sendmail兼容包装器)。 然后它会使用smtp rcpt acl。