Another patch, this one for the notify-unix or notify-zephyr services. By default, one has to chose at compile time what kind of notification he wants in Cyrus. This poses some problems to distribuitons such as Debian.
For the Debian initial packaging, I have used Zephyr support. However, since the notify_zephyr module likes to log a lot of noise when zephyr isn't actually being used and it also slows down delivery a small bit, I added the possibility of runtime-configuring Cyrus to not do notification at all. I intend to modify this in the next days to actually select between any of the possible compilable-in notification services (including none), instead. With proper configure.in and documentation fixes, of course. Suggestions and fixes welcome, especially from the CMU crew about the addition of yet another imapd.conf configuration directive (and which name it should have). The patch applies to CVS Cyrus IMAPd, HEAD branch. The new configuration directive is named "notify", and takes a boolean value. The default is to do notification (as Cyrus would do without the patch). Set it to false to disable notification. SNMP statistics are not affected. I am thinking about changing that to an string, with "none" being used for no notification at all, "zephyr" to use notify_zephyr (if support compiled in), and "unix" for notify_unix (support always compiled in). -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
--- cyrus21-imapd-2.1.0.0preCVS20011125.orig/imap/imapconf.h +++ cyrus21-imapd-2.1.0.0preCVS20011125/imap/imapconf.h @@ -74,6 +74,7 @@ extern const char *config_servername; extern int config_hashimapspool; +extern int config_notify; void config_scanpartition( void (*proc)() ); --- cyrus21-imapd-2.1.0.0preCVS20011125.orig/imap/lmtpd.c +++ cyrus21-imapd-2.1.0.0preCVS20011125/imap/lmtpd.c @@ -780,7 +780,8 @@ snmp_increment(SIEVE_NOTIFY, 1); - notify("SIEVE", + if (config_notify) + notify("SIEVE", nc->priority, sd->username, NULL, @@ -1128,7 +1129,8 @@ if (!r && user) { /* do we want to replace user.XXX with INBOX? */ - notify("MAIL", mailboxname, user, mailboxname, + if (config_notify) + notify("MAIL", mailboxname, user, mailboxname, notifyheader ? notifyheader : ""); } --- cyrus21-imapd-2.1.0.0preCVS20011125.orig/imap/lmtpproxyd.c +++ cyrus21-imapd-2.1.0.0preCVS20011125/imap/lmtpproxyd.c @@ -759,7 +759,8 @@ snmp_increment(SIEVE_NOTIFY, 1); - notify("SIEVE", + if (config_notify) + notify("SIEVE", nc->priority, sd->username, NULL,