0

I would like to modify received_header_text to add additional "Received: ..." header for authenticated mails - so gmail import will check SPF against our server, not client IP.

But my exim.conf does not contain received_header_text option and I can't find config file where it's located in. There is no /etc/exim4 path. Where can I change this option or how can I find proper config file? If I just need to place it into exim.conf - where exacly should I place it?

I have Exim 4.83 on Debian with Direct Admin.


What I try to do:

See related question.

I thought about changing:

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

to:

received_header_text = ${if def:authenticated_id {Received: from $primary_hostname ([188.40.153.39] helo=[188.40.153.39]) by $primary_hostname with ESMTP\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}}\n\t}}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}}
1

The first step is to find where the configuration file is located. When you run exim -bV it will print out the configuration file it is using. You can also see the current (and possibly the default) for that setting by running exim -bP received_header_text.

You must remember that the configuration file is likely strictly controlled by the DirectAdmin web admin, so you could really break your system if you're not careful. Chances are high though, that the config file shown from -bV above will be a dynamically generated file, and any manual changes you make will be overwritten the next time exim is restarted. I think you'll get better answers by pursuing this through the DirectAdmin forums as they know what requirements there might be to manually change the mail subsystem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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