Eelco van Beek - IC&S writes:
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.

well do them redundant..
but as I said, big chunk of dbmail.conf is useless without the DB, except
if you've written some sort of caching which will fallback to fs if the database is not there, else - stick it in the database. If there's no use for something being there - take it off. Aaron's suggestion pretty much does the job. No one said anything about specifing db tablenames in conf file? But then you have to modify all the queries .. at least you'll be able to kill some static code (i.e. sql queries)
tusers = my_users
taliases = my_aliases
[etc]
Hm give me 2-3 days and I'll give you a PoC on these on dbmail 1.2
(time is hard to find..)
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.

well to be honest, having 1 config file is a pain.. but that's not dbmail's fault that goes back years since unix sysv and old bsd.. the guys from bell labs fixed them by creating a totally new OS. Shame that all the others (most of them) adopted global namespace. so.. no advances in linux/bsd for the last 10y.. On other hand conf files suck, for my local box 2/3 of postfix is in the DB, dbmail goes there too, apache logs straight there too wey - even mrtg and some other stuff i wrote. Easier to administrate and you don't need a genius to write a simple php/perl/whatever to do few queries and show you some data.
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 :)

Well give us a reason good enough, how that is going to be usefull in general? looking at the logic - i dont see a reason.
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)
  )

cheers

Reply via email to