domain.com和domain.net托pipe在同一台服务器server1 。 为避免垃圾邮件和病毒,所有传出的电子邮件(甚至是本地域名)都需要使用第三方服务进行扫描。 因此,从[email protected]到[email protected]电子邮件应离开server1 ,然后在server1外部检查,然后根据其MXlogging将其发送到server1 ,从中发送它。
在这里,我们结束一个循环: Too many "Received" headers - suspected mail loop 。
这就是我所拥有的:
smarthost_relay: driver = manualroute ignore_target_hosts = 127.0.0.0/8 condition = ${if !inlist{$sender_host_address}{<; 46.xxx.xxx.xxx }} condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}} condition = '${perl{check_limits}}' transport = auth_relay route_list = $domain 46.xxx.xxx.xxx::587 same_domain_copy_routing = yes no_more
$sender_host_address在这里不起作用,正如我所料。 因为在远程检查后电子邮件到达时它是空的。 我错过了什么? 如何完成它?
问候,亚历克斯。
您可能希望在消息处理期间在ACL中设置ACLvariables,以指示消息是从SPAMfilter接收的。 有几个通常未定义的ACL可用于此目的。 一个像这样的ACL块应该通过IP或DNS名称来检测垃圾邮件filter:
warn hosts = 46.xxx.xxx.xxx : spamfilter.example.com set acl_c9 = SPAMFiltered logwrite = Received from SPAM Filter server
然后在运输中使用一个简单的检查variables。
condition = ${if eq {$acl_c9}{}}
一旦你知道它正在工作,你可以从ACL中删除log_write。
为此,您需要确保您没有使用TURN或ETRN来接收您用来发送垃圾邮件过滤信息的连接上的邮件。
如果你想尝试修改你的条件,你可能想看看match_ip而不是in_list。
要过滤在同一个域内的邮件路由,请尝试使用如下路由器条件:
domains = ! $sender_address_domain
我在acl_check_mail:添加了以下几行acl_check_mail:
warn hosts = ! 46.xxx.xxx.xxx set acl_m_filtered = 0 add_header = X-Received-SPAM-Filtered: $acl_m_filtered warn hosts = 46.xxx.xxx.xxx set acl_m_filtered = 1 add_header = X-Received-SPAM-Filtered: $acl_m_filtered
并使用condition = ${if eq {$acl_m_filtered}{0}{yes}{no}}检查我的路由器。
到目前为止没有循环;)