1

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}}
Zbyszek
  • 175
  • 1
  • 10
  • Hello I have same problem here https://serverfault.com/questions/1043431/spf-softfail-domain-of-transitioning-xxcompany-com-does-not-designate-x-x-x-x-a Have you resolved your issue? – Sz3jdii Dec 30 '20 at 17:34
  • 1
    I believe the answer below helped me, but I really don't remember right now. It was nearly 6 years ago. – Zbyszek Dec 30 '20 at 17:51

1 Answers1

2

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.

Todd Lyons
  • 2,006
  • 16
  • 12