-
-
Notifications
You must be signed in to change notification settings - Fork 3
cdb database.8
cdb-database - prepare cdb assignments for ctrlenv
cdb-database filename
cdb-database reads the assignments in /etc/indimail/control/filename and writes them into /etc/indimail/control/filename.cdb in a binary format suited for quick access by ctrlenv. Extra arguments provided after filename are silently ignored. cdb-database can be used for creating /etc/indimail/control/remote_auth.cdb from /etc/indimail/control/remote_auth, for use by user/password lookup by qmail-remote, when using authenticated SMTP.
If there is a problem with /etc/indimail/control/filename, cdb-database complains and leaves /etc/indimail/control/filename.cdb alone.
cdb-database ensures that /etc/indimail/control/filename.cdb is updated atomically, so ctrlenv never has to wait for cdb-database to finish. However, cdb-database makes no attempt to protect against two simultaneous updates of /etc/indimail/control/filename.cdb.
The binary /etc/indimail/control/filename.cdb format is portable across machines.
/etc/indimail/control/filename is a series of assignments, one per line. It ends with a line containing a single dot. Lines must not contain NUL. You can have comments by having '#' as the first charactor in any line.
Lines in /etc/indimail/control/filename consists of address and value separated by the ':' character.
=joe.shmoe@indimail.org:DKIMSIGN=/etc/indimail/control/domainkeys/joe:
When ctrlenv is run against this file using address joe.shmoe@indimail.org, DKIMSIGN will be set to /etc/indimail/control/domainkeys/joe
A simple assignment is a line of the form
=local:value:
Here local is an address; value is the value of environment variable that ctrlenv will set when it finds a match for address local.
If there are several assignments for the same local address, ctrlenv will use the first one.
local is interpreted without regard to case.
A wildcard assignment is a line of the form
+loc:value:
This assignment applies to any address beginning with loc, including loc itself. It means the same as
=locext:value:
for every string ext .
A more specific wildcard assignment overrides a less specific assignment, and a simple assignment overrides any wildcard assignment. For example:
+:/etc/indimail/control/domainkeys/%/default:
+joe-:/etc/indimail/control/domainkeys/indimail.org/joe:
=joe:/etc/indimail/control/domainkeys/example.com/joe:
The address joe is handled by the third line; the address joe-direct is handled by the second line; the address bill is handled by the first line.