AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 839001
Accepted
Alex
Alex
Asked: 2017-03-18 10:56:02 +0800 CST2017-03-18 10:56:02 +0800 CST 2017-03-18 10:56:02 +0800 CST

Exim4:外发电子邮件的垃圾邮件检查后的本地递送

  • 772

domain.com并且domain.net托管在同一台服务器上server1。为避免垃圾邮件和病毒,所有外发电子邮件(甚至是本地域)都需要使用 3rd 方服务进行扫描。[email protected]因此,来自to的电子邮件[email protected]应该离开server1,然后将在 外部进行检查server1,然后根据其 MX 记录将其传递到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不起作用。因为在远程检查后电子邮件到达时它是空的。我想念什么?如何实现它?

问候,亚历克斯。

exim smarthost
  • 2 2 个回答
  • 237 Views

2 个回答

  • Voted
  1. Best Answer
    BillThor
    2017-03-18T15:46:14+08:002017-03-18T15:46:14+08:00

    您可能希望在消息处理期间在 ACL 中设置 ACL 变量,以指示该消息是从垃圾邮件过滤器接收的。有几个通常未定义的 ACL 可用于此目的。类似这样的 ACL 块应该通过 IP 或 DNS 名称检测垃圾邮件过滤器:

    warn
      hosts = 46.xxx.xxx.xxx : spamfilter.example.com
      set acl_c9 = SPAMFiltered
      logwrite = Received from SPAM Filter server
    

    然后对传输中的变量进行简单检查。

     condition = ${if eq {$acl_c9}{}}
    

    一旦您知道它正在工作,您就可以从 ACL 中删除 log_write。

    为此,您需要确保您没有使用 TURN 或 ETRN 在用于发送垃圾邮件过滤邮件的连接上接收回邮件。

    如果您想尝试修改您的条件,您可能需要查看 match_ip 运算符而不是 in_list。

    要过滤掉同一域内路由的消息,请尝试使用以下路由器条件:

    domains = ! $sender_address_domain
    
    • 2
  2. Alex
    2017-03-18T21:34:38+08:002017-03-18T21:34:38+08:00

    我在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}}并在我的路由器中使用检查。

    到目前为止没有循环;)

    • 0

相关问题

  • Postfix 或 exim:自动/程序化和转发电子邮件设置

  • 将所有(未被拒绝的)垃圾邮件重定向到 sa-exim 中的特殊邮箱

  • 设置 Exim 转发邮件

  • 我可以在 Exchange 2007 的服务器端强制执行邮件规则吗?

  • 用于从多个 IP 地址发送电子邮件的 Linux 电子邮件服务器

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve