[exim] Debian - dynamic local_domains?

Inizio della pagina
Delete this message
Reply to this message
Autore: Ray O'Donnell
Data:  
To: exim-users
Oggetto: [exim] Debian - dynamic local_domains?
Hello,

I'm new to this list, so apologies if this should be asked elsewhere -
please point me in the right direction if so.

I run a small email server hosting a number of low-traffic virtual
domains (Exim + Dovecot). The OS is Debian 10, and Exim was installed
from the Debian repositories.

I'm using the split configuration option for Exim, and so each domain
has to be listed manually in /etc/exim4/update-exim4.conf.conf, in
dc_other_hostnames. When update-exim4.conf is run to generate the main
Exim configuration file, this list gets put into a macro
MAIN_LOCAL_DOMAINS, and this in turn gets inserted into local_domains.

In my case the domains and users are stored in a PostgreSQL database, so
I'm wondering if it's possible to generate local_domains directly from
the database. I've tried:

(i) Putting this in /etc/exim4/update-exim4.conf.conf:

dc_other_hostnames=${lookup pgsql{select domain_name from domains }}

(ii) Setting MAIN_LOCAL_DOMAINS in
/etc/exim4/conf.d/main/000_localmacros, which contains various local
settings:

MAIN_LOCAL_MACROS = ${lookup pgsql{select domain_name from domains }}

However, in both cases I get relay-denied errors when sending email to
one of the hosted domains.

I could try setting local_domains directly in
/etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs, but I'm loath to
do this as it may get clobbered by a package update.

In fairness, it's not a major issue - new domains are added very
rarely... it's more curiosity, and something which appeals to my sense
of tidiness!

Thanks in advance for any advice or pointers.

Ray O'Donnell.


--
Raymond O'Donnell // Galway // Ireland
ray@???

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/