Remove local headers on debian wheezy for outgoing mail

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).


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