6

I'm trying to get rid of the version number that you see when you get an email sent from Exim.

Received: from user1 by site.org with local (Exim 4.72)

I'v tried editing smtp_banner in these two files

/etc/exim4/conf.d/main/02_exim4-config_options
/etc/exim4/exim4.conf.template

But deleting the version number from there, then reloading Exim's config doesn't work.

I send my test emails like so:

echo "Message Content" | mail -s "Subject goes here" email@email.com -v

Update 1

comp1:/etc/exim4# ls -l /etc/exim4/
total 96
drwxr-xr-x 9 root root         4096 Jul 30  2010 conf.d
-rw-r--r-- 1 root root        76239 Jan 21 08:24 exim4.conf.template
-rw-r----- 1 root Debian-exim   204 Sep 30  2008 passwd.client
-rw-r--r-- 1 root root         1462 Jan 21 07:39 update-exim4.conf.conf
8

Open the file /etc/exim.conf and find the key smtp_banner, then change that line in this way :

From

smtp_banner = "${primary_hostname} ESMTP Exim ${version_number} \ 

To

smtp_banner = "${primary_hostname} ESMTP \
  • I don't have a exim.conf file, Debian uses splt config. ls: cannot access /etc/exim.conf: No such file or directory. Check out update one on my org post. – Mint Jan 21 '12 at 9:57
  • 1
    grep version_number -R /etc and find where it's located then – Tom O'Connor Jan 21 '12 at 11:07
  • 1
    Use grep -r smtp_banner /etc/exim/ to find the correct file. – joschi Jan 21 '12 at 11:07
  • first one comes up with /etc/exim4/conf.d/main/02_exim4-config_options: I'v changed this deleted the version number + restart but it still shows when sending an email. The 2nd one comes up with the two files listed in my org post, which I have already changed and it had no effect. – Mint Jan 22 '12 at 0:20
  • It is strange there is something wrong in the setup ... The file /etc/exim.conf should exist in a standard setup ... How have you installed Exim ? – aleroot Jan 22 '12 at 7:32
4

smtp_banner modifies the banner displayed to the client upon connection, but it looks like you want to change what's being put in the Received: header.

For that, you'll want to define received_header_text, probably in /etc/exim4/conf.d/main/02_exim4-config_options. The option isn't in the file by default, but per the documentation the default setting is

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

So you should be able to just paste the above text into your config, making whatever changes you'd like.

  • I also tried that. Still no luck – Mint Jan 21 '12 at 22:33
0

you have to edit /etc/exim4/exim4.conf.template:

$ grep  smtp_banner /etc/exim4/*
/etc/exim4/exim4.conf.template:# smtp_banner = $smtp_active_hostname ESMTP Exim $version_number $tod_full

There do what aleroot suggested.

  • I'v tried that, it doesn't make any difference. I even done a system restart. – Mint Jan 21 '12 at 22:33
  • did you ran update-exim4.conf ? – ThorstenS Jan 22 '12 at 13:08
0

The post shows the macros that need to be set, but is not clear about how to set them. If you are using a Debian/Ubuntu system you can define them in /etc/exim4/exim.conf.localmacros. If you are using the split configuration, then you should create a symlink to this file with a name like 00_exim-conf-localmacros in /etc/exim4/conf.d/main. Once you have done this you can restart.

Check the configuration in /var/lib/exim/conf.autogenerated to ensure your macros are included.

If you are using other systems, the configuration file may be provided using a different mechanism. The default configuration may be /etc/exim4/exim4.conf. Debian/Ubuntu systems will use this it it exists.

It appears you may need to make a number of configuration changes. On a Debian/Ubuntu system I would suggest you use the split configuration. If you make your changes using the documented mechanism, version updates should not break or loose your configuration changes.

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.