在发送邮件的debian wheezy上删除本地标头

我有清洁安装debian wheezy。 我需要删除以下标题:

Received: from www-data by %SERVERNAME% with local (Exim 4.80) 

相关的答案没有帮助,因为我只是无法find在哪里configuration:

  • 删除exim本地用户名
  • 删除Exim版本号

我尝试执行/ usr / sbin / exim4 -bP received_header_text,并显示当前received_header_textvariables的值。 但是,我可以设置它?

我试图在/ etc / exim4中看到,但是grep -r "received_header_text"没有给出结果。 我应该在哪里更改received_header_textvariables值?

做一个recursiongrep的选项是一个好主意。 / etc / exim4中的configuration文件是您应该进行更改的位置。 至于为什么你的grep没有find它,许多exim选项都有一个硬编码的默认值。 该选项并未在Debianconfiguration文件中设置,因为Debian作者不需要将其从默认设置中更改。

最终的解决scheme是在你连接的答案中,但这些链接显示了变化的语法:

  1. http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_run_time_configuration_file.html#SECTcos
  2. http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html

在挤压,至less,这将进入/etc/exim4/conf.d/main/02_exim4-config_options:received_header_text received_header_text = blah blah ...hide received_header_text = blah blah ...如果你不想非根本地用户能够看到你做了什么。

但是这些文件的Debian化突破并不重要, 他们只是为了pipe理员的方便。 每次启动或重新启动exim或手动运行update-exim4.conf Debian都会从所有这些单个文件构build一个大的configuration文件。 因此,在进行更改后,不要忘记重新启动exim(重新生成configuration文件)。

我知道这个问题已经有一段时间了,但是如果我理解正确的话,还有另外一种方法可以去除外发消息上的“收到”头。 使用received_header_text选项是编辑“收到”标题的好方法,但是如果你想从所有外发邮件中删除它,那么在你的“smtp传输”的选项中,你可以使用headers_remove和一个条目:

 remote_smtp: driver = smtp headers_remove = received 

有关更多信息,请参阅Exim文档47.17