在 exim.config 文件中找不到 received_header_text

在 exim.config 文件中找不到 received_header_text

我想修改 received_header_text 来为经过身份验证的邮件添加额外的“Received: ...”标头 - 因此 gmail 导入将根据我们的服务器而不是客户端 IP 检查 SPF。

但是我的 exim.conf 不包含 received_header_text 选项,我找不到它所在的配置文件。没有 /etc/exim4 路径。我可以在哪里更改此选项或如何找到正确的配置文件?如果我只需要将其放入 exim.conf - 我到底应该把它放在哪里?

我在 Debian 上安装了 Exim 4.83 并安装了 Direct Admin。


我尝试做的是:

参见相关问题。

我想过改变:

received_header_text = Received: ${if def:sender_rcvhost {from $sender_rcvhost\n\t}{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher)\n\t}}(Exim $version_number)\n\t${if def:sender_address {(envelope-from <$sender_address>)\n\t}}id $message_exim_id${if def:received_for {\n\tfor $received_for}}

到:

received_header_text = ${if def:authenticated_id {Received: from $primary_hostname ([188.40.153.39] helo=[188.40.153.39]) by $primary_hostname with ESMTP\n\t(Exim $version_number)\n\t${if def:sender_address {(envelope-from <$sender_address>)\n\t}}id $message_exim_id${if def:received_for {\n\tfor $received_for}}\n\t}}Received: ${if def:sender_rcvhost {from $sender_rcvhost\n\t}{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher)\n\t}}(Exim $version_number)\n\t${if def:sender_address {(envelope-from <$sender_address>)\n\t}}id $message_exim_id${if def:received_for {\n\tfor $received_for}}

答案1

第一步是找到配置文件的位置。运行进出口银行它将打印出正在使用的配置文件。您还可以通过运行以下命令查看该设置的当前设置(也可能是默认设置):exim -bP 收到的标题文本

您必须记住,配置文件可能由 DirectAdmin Web 管理员严格控制,因此如果您不小心,可能会真正破坏您的系统。不过,很有可能显示的配置文件来自-bV以上将是一个动态生成的文件,下次重新启动 exim 时,您所做的任何手动更改都将被覆盖。我认为通过 DirectAdmin 论坛来解决这个问题会得到更好的答案,因为他们知道手动更改邮件子系统可能有哪些要求。

相关内容