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
    • 最新
    • 标签
主页 / user-555784

Tim Styles's questions

Martin Hope
Tim Styles
Asked: 2024-11-19 23:23:25 +0800 CST

Exim 路由器根据主题重定向电子邮件

  • 5

我想将主题为“您的包裹已到达”的电子邮件重定向到本地电子邮件别名[email protected]。为此,我创建了以下路由器:

redirect_packages:
  debug_print = "R: redirect_packages with subject $header_subject"
  driver = redirect
  domains = +local_domains
  condition = ${if eq {$header_subject} {Your Parcel has Arrived.} {true} }
  data = packages@${domain}

我无法使条件结果为真。调试输出为:

--------> redirect_packages router <--------
local_part=me domain=example.com
checking domains
cached yes match for +local_domains
cached lookup data = example.com
example.com in "+local_domains"? yes (matched "+local_domains" - cached)
 -­considering: R: redirect_packages with subject $header_subject
 ----expanding: R: redirect_packages with subject $header_subject
 -------result: R: redirect_packages with subject Your Parcel has Arrived.
            ----(tainted)
R: redirect_packages with subject Your Parcel has Arrived.
checking "condition" "${if eq {$header_subject} {Your Parcel has Arrived.} {true} }"...
 -­considering: ${if eq {$header_subject} {Your Parcel has Arrived.} {true} }
  -­considering: $header_subject} {Your Parcel has Arrived.} {true} }
  ---expanding: $header_subject} {Your Parcel has Arrived.
  -------result:  {Your Parcel has Arrived.
  -­considering: true} }
  ---expanding: true
  -------result: true
 ---condition: eq {$header_subject} {Your Parcel has Arrived.} {true}
 -----result: false
 ---expanding: ${if eq {$header_subject} {Your Parcel has Arrived.} {true} }
 -------result:
redirect_packages router skipped: condition failure

我看不出哪里出了问题。调试消息中正确扩展了 $header_subject。但是,在条件下它无法与看起来相同的文本匹配。

条件扩展的方式看起来也不对,就好像它缺少 $header_subject 后的右括号。

有人能解释一下发生了什么情况以及为什么结果不正确吗?

exim
  • 1 个回答
  • 75 Views

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