[exim] Exim and virtual domains via postgres

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Remi Cool
Data:  
Para: exim-users
Asunto: [exim] Exim and virtual domains via postgres
Hello,

I had it working I think, but an upgrade broke it .... my virtual domains.

I use exim 4.63 on Debian Etch so it's probably a Debian config problem,
but before I take it the wrong way ...

In this case I don't have any fixed local domains, all domains are
registered in a postgres database, as are the local_parts and users. It
would be nice if exim doesn't need a restart when a domain is added or
removed from the database.

The problem I now have is the following (purely debian):

in update-exim4.conf.conf I have:

dc_eximconfig_configtype='internet'
dc_localdelivery='maildir_home'
dc_other_hostnames='mydomain1.nl:mydomain2.nl'
dc_local_domains='pgsql;PG_Q_LOCAL_DOMAINS'
dc_local_interfaces='192.168.1.100'
dc_readhost=''
dc_relay_domains='pgsql;PG_Q_RELAY_DOMAINS'
dc_minimaldns='false'
dc_relay_nets='192.168.1.0/24'
#dc_smarthost=''
dc_use_split_config='true'
dc_hide_mailname='false'
dc_mailname_in_oh='true'
dc_smarthost=''
CFILEMODE='644'

The 'dc_other_hostnames' overrides 'dc_local_domains' or
'dc_local_domains' isn't used at all.
I first had the entry 'pgsql;PG_Q_LOCAL_DOMAINS' at dc_other_hostnames
and that worked fine.

The query :

PG_Q_LOCAL_DOMAINS=SELECT domain FROM PG_T_LOCAL_DOMAINS WHERE
lower(domain)=lower('$domain') AND status=0

The generated config used by exim contains:

------------------------------

.ifndef MAIN_LOCAL_DOMAINS
MAIN_LOCAL_DOMAINS = @:localhost:mydomain1.nl:mydomain2.nl
.endif
domainlist local_domains = MAIN_LOCAL_DOMAINS

.ifndef MAIN_RELAY_TO_DOMAINS
MAIN_RELAY_TO_DOMAINS = <; pgsql;PG_Q_RELAY_DOMAINS
.endif
domainlist relay_to_domains = MAIN_RELAY_TO_DOMAINS

------------------------------

Why is it that 'domainlist local_domains' isn't <;
pgsql;PG_Q_LOCAL_DOMAINS .. shouldn't that do the trick?

If I override MAIN_LOCAL_DOMAINS with: '@:localhost:<;
pgsql;PG_Q_LOCAL_DOMAINS' ... does that make the domains from the
database dynamic?

- Remi -