[sork] vacation program db formats

Eric Rostetter eric.rostetter@physics.utexas.edu
Thu, 11 Jul 2002 23:20:03 -0500


Quoting "Derek J. Balling" <dredd@megacity.org>:

> My workaround, btw, was do to:
> 
> vacation -i -f foo.db
> mv foo.db /etc/horde2/vacation_template.db
> 
> and change "/dev/null" to "/etc/horde2/vacation_template.db" in vacation.php

Not all vacation programs have -f, and as you say, this could be painful 
since different servers may use different formats...

> You'll want to do configure that on a per-mailhost basis, though, 
> (seeing a bug ahead of time). It's possible mailhost1 is using DB2, 
> mailhost2 is using DB3 and mailhost3 is using DB4, and each of those 
> would need a different "initialized template", since they're not 
> really intercompatible.

Yes, this is probably best to do as a per realm setting.

We can make a per realm setting that lets you select database types of
(for example) null, ndbm, gdbm, db2, db3.  Null would be the default and
would do the same as now (create and copy an empty file).  The others
would check for the needed db functions being in your php, and if not
there then generate an error (or default back to null??? probably the error
is best).  Assuming the needed db extensions are there, then generate
a database of the correct type (empty, but an actual database) and then
copy that.

This assumes that the files should be empty, but valid database files.
I'm not sure if this is true or not for all versions of vacation.  But
it should surely be more compatible than our current empty files, and 
support ones that use databases with different extensions that the ones
I force in there now...

Further reading at:

http://php.benscom.com/manual/en/ref.dba.php#dba.requirements

Any thoughts???

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

"TAD (Technology Attachment Disorder) is an unshakable, impractical devotion
to a brand, platform, product line, or programming language. It's relatively
harmless among the rank and file, but when management is afflicted the damage
can be measured in dollars. It's also contagious -- someone with sufficient
political clout can infect an entire organization."

--"Enterprise Strategies" columnist Tom Yager.