[Pkg-exim4-users] Questions about configuring

Ross Boylan ross@biostat.ucsf.edu
Wed, 01 Jun 2005 13:28:34 -0700


On Sun, 2005-05-29 at 08:10 +0200, Andreas Metzler wrote: 
> On 2005-05-29 Ross Boylan <ross@biostat.ucsf.edu> wrote:
> > Short version:
> 
> > Using a split config, what is the appropriate way to set or modify
> > variables such as CHECK_RCPT_VERIFY_SENDER, CHECK_RCPT_REVERSE_DNS,  and
> > MAIN_TRUSTED_USERS?
> 
> Hello,
> /etc/exim4/conf.d/main/00local
> 
> That is new file, that way you want have to do the dpkg-dance
> "conffile modified. - new, old, diff?").
> 
> [...]
> > What is the appropriate way to set these variables?  At first I thought
> > debconf manages them, but after reading the docs I suspect I should edit
> > exim4.conf.template.  Is that correct?
> 
> If you are using unsplit, you should edit exim4.conf.template (or in
> 4.50-8 and later /etc/exim4/exim4.conf.localmacros) else place them
> in a new file, that is read before the others.
I assume "else" mean "if you use split".  That was the missing piece for
me, and I think the 4.50-8 docs are much clearer on this.

I want to double-check that stuff I put in main/00_local is read before
things in the acl/ directory (for example).  The new README seems to
indicate everything can go under main, and the update-exim4.conf manpage
indicates main is read first.  Since the general logic is by
alphabetical order, and acl precedes main, I'm a little concerned
changes to acl need to go in acl/00_local.

Proposed change update-exim4.conf manpage, to make that interpretation
clearer (as well as clarifying some other things, indicated in square
brackets in the original):
Current
Depending [how?] on the setting of dc_use_split_config     in
/etc/exim4/update-exim4.conf.conf  update-exim4.conf  either  sorts the
files in  the  subdirectories  main,  acl,  router,  transport,  retry,
rewrite  and  auth [in that order?] of /etc/exim4/conf.d in the lexical
sort order [of what?], con-
catenates them and replaces  the  patterns  DEBCONFsomethingDEBCONF  or
only   replaces   the   patterns   DEBCONFsomethingDEBCONF   listed  in
/etc/exim4/exim4.conf.template.  It does not change the other  contents
of these files.  This makes it very simple to make small changes to the
configuration and still have the benefits of debconf.

Proposed
If dc_use_split_config in /etc/exim4/update-exim4.conf.conf specifies a
split configuration [still don't say exactly how, but make clear this is
the split config case, which was only implicit before],
update-exim4.conf  processes the /etc/exim4/conf.d
subdirectories  in the order main,  acl,  router,  transport,  retry,
rewrite  and  auth. Within each directory it takes files in lexical sort
order by file name.  It concatenates all these files, making the Debconf
replacement described below.

If you do not have a split configuration, update-exim4.conf uses
only /etc/exim4/exim4.conf.template.

In either case, before outputing the result
to /var/lib/exim4/config.autogenerated, update-exim4.conf replaces  the
patterns  DEBCONFsomethingDEBCONF with the contents of dc_something
from /etc/exim4/update-exim4.conf.conf.  It makes no other changes.
This makes it very simple to make small changes to the configuration and
still have the benefits of debconf.

> 
> exim4.conf.template is only used for unsplit.
> 
> [...]
> > The reason I'm not sure is that several pieces of documentation seem to
> > say that exim4.conf.template is not used if the configuration is split.
> 
> correct.
> 
> > /usr/share/doc/exim4-base/README.Debian
> > "If you want to tweak the configuration, please see the configuration
> > files in /etc/exim4/conf.d, and /etc/exim4/exim4.conf.template."
> > That makes it sound as if the latter is the right place.
> [...]
> 
> Does it? Have you got a suggestion for improving this?
If you want to tweak the configuration you should modify /etc/exim4/exim4.conf.template
if you have an "unsplit" configuration.  If you have a "split" configuration modify or add to
the files under /etc/exim4/conf.d/.  In either case the files are extensively commented.
For small changes in the split configuration, create a file with a name like 
/etc/exim4/conf.d/00_local and put appropriate variable definitions it.  See the section
on configuration below for more details.


>                 cu andreas

Although I know it would require more work, you might consider discussing the split and unsplit
configurations separately in README.Debian (and perhaps some of the man pages).  I think
that would make it easier to follow.

Finally, the comment in exim4.conf.template could be clearer.  It now reads
######################################################################
# Depending on where you find this file, this might be a template or
# an actual configuration file. Documentation about the Debian exim4
# configuration scheme can be found in
# /usr/share/doc/exim4-base/README.Debian.gz.
#
# Strings like DEBCONFsomethingDEBCONF are replaced by installation
# dependent values by update-exim4.conf, the script which builds the
# actual configuration from the templates.

I'm still not sure what the template/actual configuration file distinction means.
It would be simpler to say
######################################################################
# This file is only used in the non-split configuration case.
# Documentation about the Debian exim4
# configuration scheme can be found in
# /usr/share/doc/exim4-base/README.Debian.gz.

The second paragraph on debconf might add some of the details about where the
substitution values come from, as I did further up.  Or it could just refer
to other docs.

I think part of the problem is that this file is generated from another during
build, because the same comment also appears  01_exim4-config_listmacrosdefs.
It's also confusing there.  If it is too much trouble to produce separate comments
for each, the comment could just say
######################################################################
# /etc/exim4/exim4.conf.template is only used in the non-split configuration case.
# /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs is only used for split
# configurations.
# Documentation about the Debian exim4
# configuration scheme can be found in
# /usr/share/doc/exim4-base/README.Debian.gz.

-- 
Ross Boylan                                      wk:  (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4          ross@biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840                     hm:  (415) 550-1062