[Exim] more embedded perl

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: case
Data:  
Para: exim-users
Asunto: [Exim] more embedded perl
Since we're already running our apache webservers configured entirly
with LDAP data
through (mod_)perl I've been trying to do something similar with exim (
and other
servers, but I wont waste your time with those efforts here. )

This seems to work rather well for the global part of the config... I've
got
perl_at_start           = yes
perl_startup            = do '/usr/cyrus/etc/exim.pl'


where exim.pl is a perl script that looks up exim configuration for that
machine
based on the hostname. It calls Exim::set_option() for each option it
finds after
formatting it in a way similar to the lines that would appear in
configure

Exim::set_option() is modelled after Exim::expand_string in perl.c; It
basically just
hands the option over to readconf_handle_option();

This works great for the global section .. but I cant seem to come up
with a way
to set the transports, directors, routers etc. the same way.

main.c calls transport_init() direct_init() route_init()
readconf_retries() readconf_rewrites()

which do a pretty good job of hiding the options in that section from
the rest of the program..
While it shouldnt be too hard to just repeat similar code for each of
these sections that
would mean significantly more LDAP access which we're trying to limit
since all servers
will be accessing those servers.

My best solution so far is maintaining a 'cached' version of the 'file'
in memory and
updating it with the data from LDAP, but thats hardly a solution to be
proud of.

Suggestions, Ideas ?

Thanks,
Case van Rij
Liquisite Development.