> Bron Gondwana wrote: >> On Mon, Jan 04, 2010 at 09:11:10AM +0100, Simon Matter wrote: >>>> Or you can use a dummy backend. It's a backend which always says « OK >>>> » when you try to write in it, and always says « not in db » when you >>>> read in it. This backend was never committed into cyrus-imapd... Here >>>> is an up-to-date version. >>>> >>>> Then add this in imapd.conf : >>>> duplicate_db: dummy >>>> >>>> Ken, Bron : do you plan to include this backend into cyrus-imapd ? >>>> It's very handy when we don't want to use a database (here we often >>>> use dummy for annotations). >>> It looks really useful to me. Any chance this will go into upstream? >>> I'd >>> prefer to include it in my RPMs if I know it's also in upstream. >> >> It certainly will! There's a bit of 2.3 vs 2.4 uncertainty about where >> to put code. I think we've pretty much put 2.3 into maintainence mode. >> I'm telling everyone that we're releasing 2.4 in April on the theory >> that >> if you repeat something often enough it becomes true! > > Do we really need a dummy backend, or should we just rewrite the code so > that non-critical DBs can be specified as nil/none/null and just not > make the database calls? I think that may also fix the problem and implementation looks even easier than the dummy backend. My own real problem as RPM maintainer is that I'd like to stay with logging to mail facility and not touching syslog config. Now with older releases, this was possible without much trouble because the logging volume was moderate for not too heavy loaded servers. With some recent developments this became worse and I'm wondering whether it was intentional. My workaraound was to simply remove the culprits as seen in the patch because I didn't quickly find a better solution. I was hoping to use CYRUS_VERBOSE to control verbosity but that doesn't seem to work outside of master. Does anyone have a better solution for the hacks below? Regards, Simon --- cyrus-imapd-2.3.16/imap/global.c.orig 2009-10-13 17:10:36.000000000 +0200 +++ cyrus-imapd-2.3.16/imap/global.c 2009-12-22 09:22:27.000000000 +0100 @@ -553,7 +553,7 @@ } /* try to open database */ - r = DENYDB->open(fname, 0, &db); + r = DENYDB->open(fname, CYRUSDB_CREATE, &db); if (r) { /* ignore non-existent DB, report all other errors */ if (errno != ENOENT) { @@ -566,7 +566,7 @@ const char *data = NULL; int datalen; - syslog(LOG_DEBUG, "fetching user_deny.db entry for '%s'", user); + /* syslog(LOG_DEBUG, "fetching user_deny.db entry for '%s'", user); */ do { r = DENYDB->fetch(db, user, strlen(user), &data, &datalen, NULL); } while (r == CYRUSDB_AGAIN); [simix@wurro cyrus-imapd-2.3.16-1.src]$ cat cyrus-imapd-2.3.12-statuscache_verbosity.patch --- cyrus-imapd-2.3.12/imap/index.c.orig 2008-03-24 18:09:17.000000000 +0100 +++ cyrus-imapd-2.3.12/imap/index.c 2008-04-24 11:25:28.000000000 +0200 @@ -1573,13 +1573,13 @@ */ if (!r) { - syslog(LOG_DEBUG, "statuscache, '%s', '%s', '0x%02x', 'yes'", - mboxname, imapd_userid, statusitems); + /* syslog(LOG_DEBUG, "statuscache, '%s', '%s', '0x%02x', 'yes'", + mboxname, imapd_userid, statusitems); */ goto statusdone; } - syslog(LOG_DEBUG, "statuscache, '%s', '%s', '0x%02x', 'no'", - mboxname, imapd_userid, statusitems); + /* syslog(LOG_DEBUG, "statuscache, '%s', '%s', '0x%02x', 'no'", + mboxname, imapd_userid, statusitems); */ } /* Missing or invalid cache entry */ ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html