Hello all, I posted earlier looking for an alternative to locals, hosteddomains and esmtpacceptmailfor.
What I really want to be able to do is add / remove entries from locals, hosteddomains, esmtpacceptmailfor, and aliases without interrupting courier, and also without having to rebuild the entire dat file just to add or remove one entry. It seems rather wasteful to have to recreate an entire file (with possibly thousands of entries) just to add or remove one entry. And you also have to prevent two copies of makedat from firing off at once. Instead of making a lot of proprietary changes to courier would it be possible (desireable) to modify bdbobj.c in the following manner: Starting on line 114 of bdbobj.c add code that would call Berkeley DB db_env_create(...) to create a BDB environment. Modify struct bdbobj to include a DB_ENV to store the environment created from the above modification. in bdbobj.c again, add calls to dbenv->open and use the flags DB_INIT_CDB and DB_INIT_MPOOL and (only if necessary) DB_CDB_ALL. For more information on these flags see http://www.sleepycat.com/docs/ref/cam/intro.html These modifications would allow the dat files used by courier to be modified in place. No further modification to courier should be necessary. The Berkeley DB takes care of any and all locking for updates to the dat files. This would allow external programs to update the dat files (as long as they setup the same environment) without corruption of the dat files, and without recreating them completely to change a single entry. Could a modification such as this be incorporated into courier? Is there any reason a modification such as this shouldn't be incorporated into courier? Perhaps this modification could be created as an option you need to specify during build to enable, so as not to change couriers original "default" method of operation? What performance penalty (if any?) would there be from using this kind of a setup? I am not overly familiar with Berkeley DB, so I look to all of you for your wisdom. Thanks for you time and help Rob _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
