Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can i remove the local username in the mail headers with exim4 running on debian 6?

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

So I want to remove the part with root and the local hostname together(?).

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You need to modify received_header_text as per the documentation.

It defaults to:

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}}

After modification it'll be:

  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)
share|improve this answer
    
Thank you. In my split-configuration i had to add these lines to a file in the main dir. –  Gustav Jan 4 '12 at 1:23
    
This does not work in Debian 6.0.5. It yields a string expansion error, trying to sort out why. –  Joel E Salas Jul 27 '12 at 21:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.