Re: [exim] Multiple config files OpenBSD

Inizio della pagina
Delete this message
Reply to this message
Autore: Evgeniy Berdnikov
Data:  
To: exim-users
Oggetto: Re: [exim] Multiple config files OpenBSD
On Fri, Dec 12, 2014 at 08:55:58PM +0100, Bertrand Caplet wrote:
> >
> > It only works for a file, as far as Exim is concerned:
> >
> > http://exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_run_time_configuration_file.html#SECID41
> >
> > Section 3: File inclusions in the configuration file
>
> Hey,
>
> just for you to know I had multiple config files on *BSD working.
> I modified the /etc/rc.d/exim file :
>
> rc_pre() {
>         [ ! -f /etc/mailer.conf.exim ]
> cat ${exim_path}configure.conf > ${exim_path}configure && find
> ${exim_path}conf.d -type f | grep conf.d/main |sort| xargs cat >>
> ${exim_path}configure&& find ${exim_path}conf.d -type f | grep -v
> conf.d/main |sort| xargs cat >> ${exim_path}configure
> }

>
> That's pretty dirty but it works perfectly. If you have better ideas I'm
> open


You can't include sections of configuration file in arbitrarily mixed
order, because routers should be put into "router" section, transports
to "transport" section, the same for acls, rewrite, auth and others.
Each section must have a specific delimiter for its beginning.

Yes, you can do this via sorting with specifically chosen file names, but
such approach is ugly and completely misleading. The better way is to
include each section separately, as Debian script "update-exim4.conf" does:

UPEX4C_sections="main acl router transport retry rewrite auth"
[...]
                        for i in ${UPEX4C_sections} ; do
                                cat_parts "${UPEX4C_confd}/$i"
                        done
-- 
 Eugene Berdnikov