An idea that may work to suit everyone's preference of the config
layout:  define specific section names for config items, like [SMTP],
and add that field to Aaron's table example below, and add an
[INCLUDE "/path/to/filename"] function to the config file parser.

  Make the config reader get the db parameters from the config file
(also add an (optional) item to the config file to disable
database config lookups completely for those who don't use them),
read in all the default values from the db, then override with any
host specific values from the db, then read through the local config
file and override settings with anything found there.

  Everyone could have the setup they wish - a huge dbmail.conf file,
or a minimal one with mostly db config settings, or even break the
local config into multiple files (/etc/dbmail/{dbmail,logging,host}.conf)
or whatever else you could think of.



---- Original Message ----
From: Eelco van Beek - IC&S <[email protected]>
To: [email protected]
Subject: Re: [Dbmail-dev] Re: table prefix
Sent: Thu, 8 Jan 2004 10:34:04 +0100

> We could also do both (config on file and in the db) and keep them in 
> sync. This enables easier administration through interfaces on the DB.
> 
> 
> On 8-jan-04, at 9:44, Mark Mackay - Orcon wrote:
> 
> > I really like having a local config file [much better than the old 
> > days of
> > having to compile the database name in, etc]; and I like being
able to 
> > just
> > 'vi' a file to enable logging, adjust process levels on one of the 
> > hosts,
> > etc.
> >
> > If you want to do database configs as well, then the syntax below 
> > would work
> > -- but rather than via hostname, I'd recommend making it some form of
> > 'clientid/configid' which could be supplied on command lines (e.g.
> > ../dbmail-pop3d -configkey DEFAULT) That would allow configs to be
> > experimented with and changed between without having to affect other 
> > daemons
> > on the same host, etc.
> >
> > Personally I just say keep the config files :)
> >
> > Cheers,
> > Mark.
> >
> >> dbmail.conf:
> >>   Is a configuration file in /etc or wherever.
> >>   - database information
> >>   - logging info
> >>   - hostname / clustering info
> >>
> >> dbmail_conf:
> >>   Is a table in the database.
> >>   - Has detailed config info in host/key/value pairs:
> >>
> >>   CREATE TABLE dbmail_conf (
> >>     hostname  VARCHAR(128) NOT NULL,
> >>     key       VARCHAR(32)  NOT NULL,
> >>     value     TEXT             NULL,
> >>     UNIQUE INDEX (hostname, key)
> >>   )
> >
> > _______________________________________________
> > Dbmail-dev mailing list
> > [email protected]
> > http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> >
> _________________________
> E.J.A. van Beek
> ICT Manager
> IC&S
> T: +31 30 6355730
> F: +31 30 6355731
> 
> PGP-key:
> www.ic-s.nl/keys/eelco.txt
> 
> _______________________________________________
> Dbmail-dev mailing list
> [email protected]
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> 
-- End Original Message --


--
Jesse Norell
jesse (at) kci.net


Reply via email to