1

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

# /etc/exim4/update-exim4.conf.conf 
dc_relay_domains='lsearch;/etc/exim4/relay_domains'

but it produces a warning and doesent work...

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

1 Answer 1

3

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.

2
  • my update-exim4.conf didnt care about exmi4.localmacros, but i included it in the main section of exim4.conf.template...
    – Florian F
    Jan 30, 2011 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, 2011 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .