I'm trying to make exim4 read the relay hosts from a file. i tryed lsearch:

# /etc/exim4/update-exim4.conf.conf 

but it produces a warning and doesent work...

WARNING: using 'lookup;' constructs in /etc/exim4/update-exim4.conf.conf has never been supported!

What man update-exim4.conf indicates to do in those cases is to locally set the macros creating the /etc/exim4/exim4.conf.localmacros and putting your macros in it. The macro you need is MAIN_RELAY_TO_DOMAINS, so your local macros file should include:

MAIN_RELAY_TO_DOMAINS = lsearch;/etc/exim4/relay_domains

After you restart exim you can check the /var/lib/exim4/config.autogenerated and see that it was correctly added.

  • my update-exim4.conf didnt care about exmi4.localmacros, but i included it in the main section of exim4.conf.template... – Florian Fida Jan 30 '11 at 18:00
  • Ouch sorry, the correct filename is /etc/exim4/exim4. The template works (actually, the first version of my answer was suggesting it) but there are cases where the template can be regenerated and you will lose the work, localmacros is safer. – coredump Jan 31 '11 at 15:55

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.