在 exim.config 檔案中找不到 receive_header_text

在 exim.config 檔案中找不到 receive_header_text

我想修改 receive_header_text 來為經過身份驗證的郵件添加額外的“已接收:...”標頭 - 因此 gmail 導入將根據我們的伺服器檢查 SPF,而不是客戶端 IP。

但我的 exim.conf 不包含 receive_header_text 選項,而且我找不到它所在的設定檔。我在哪裡可以更改此選項或如何找到正確的設定檔?如果我只需要將它放入 exim.conf - 我應該將它放在哪裡?

我在 Debian 上安裝了 Exim 4.83,具有直接管理功能。


我嘗試做的事情:

請參閱相關問題。

我想過改變:

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

第一步是找到設定檔所在的位置。當你跑步時進出口-bV它將列印出它正在使用的設定檔。您也可以透過運行來查看該設定的當前(可能是預設)exim -bP 收到的標頭文本

您必須記住,設定檔可能受到 DirectAdmin Web 管理員的嚴格控制,因此如果您不小心,您可能真的會破壞您的系統。不過,設定檔顯示的可能性很高-bV上面將是動態生成的文件,您所做的任何手動更改都將在下次重新啟動 exim 時被覆蓋。我認為透過 DirectAdmin 論壇尋求此問題您會得到更好的答案,因為他們知道手動更改郵件子系統可能有哪些要求。

相關內容