删除 exim 本地用户名

删除 exim 本地用户名

如何使用在 Debian 6 上运行的 exim4 删除邮件头中的本地用户名?

Received: from root by host.domain.com with local (Exim 4.72)
(envelope-from <[email protected]>)
id 123123123
for [email protected]; Tue, 03 Jan 2012 13:08:17 +0100

所以我想一起删除包含 root 和本地主机名的部分(?)。

答案1

您需要received_header_text按照文档

其默认为:

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 = Received: \
  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}}

  (IT IS WORKING CODE)

相关内容