6

I have clean installation of debian wheezy. I need to remove following headers:

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

Related answers did not help, because i just can't find where to configure this:

I tried to execute /usr/sbin/exim4 -bP received_header_text, and it shows current received_header_text variable value. But where i can set it up?

I tried to see in /etc/exim4, but grep -r "received_header_text" has given no results. Where should i change received_header_text variable value?

2

2 Answers 2

3

Doing a recursive grep for the option was a good idea. The configuration files in /etc/exim4 are where you should make the change you want. As to why your grep didn't find it, many exim options have a hard-coded default value. The option was not set in the Debian config files because the Debian authors didn't need to change it from the default.

The ultimate solution was in the answer you linked, but these links show the syntax of the change:

  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

On Squeeze, at least, this would go in /etc/exim4/conf.d/main/02_exim4-config_options: received_header_text = blah blah ... or hide received_header_text = blah blah ... if you don't want non-root local users to be able to see what you did.

But the Debian-ized breakouts of the files don't really matter to exim; they're just for administrator convenience. Debian builds a single large config file from all of these individual files each time you start or restart exim or manually run update-exim4.conf. So after you make your changes, don't forget to restart exim (to regenerate the config file).

2

I know it has been awhile since this question was asked, but if I understand it correctly, there is also another way to remove the "received" header on outgoing messages. Using the received_header_text option is a good way to edit the "received" header, but if you wish to remove it from all outgoing messages, then in the options for your "smtp transport" you can use headers_remove with an entry like:

remote_smtp:
  driver = smtp
  headers_remove = received

More can be read about this in Exim Documentation 47.17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .