I've committed this patch, adjusted only slightly to apply cleanly to
CVS HEAD.
:wes
On 17 Mar 2008, at 20:28, Andrew Morgan wrote:
I wanted to make sure that our frontends never return a referral to
a backend (Pine seems to trigger this a lot). Attached is a patch
which adds an option to imapd.conf to disable mailbox referrals.
It is based on another person's patch I got from this list.
diff -ur cyrus-imapd-2.3.11/imap/imapd.c cyrus-imapd-2.3.11.new/imap/imapd.c
--- cyrus-imapd-2.3.11/imap/imapd.c 2007-11-27 07:31:28.000000000 -0800
+++ cyrus-imapd-2.3.11.new/imap/imapd.c 2008-03-14 15:57:45.000000000 -0700
@@ -5771,7 +5771,11 @@
struct auth_state *auth_state, int (*proc)(),
void *rock, int force);
- if (listopts & LIST_REMOTE) supports_referrals = !disable_referrals;
+ if (listopts & LIST_REMOTE) {
+ if (!config_getswitch(IMAPOPT_PROXYD_DISABLE_MAILBOX_REFERRALS)) {
+ supports_referrals = !disable_referrals;
+ }
+ }
/* Ignore the reference argument?
(the behavior in 1.5.10 & older) */
diff -ur cyrus-imapd-2.3.11/lib/imapoptions cyrus-imapd-2.3.11.new/lib/imapoptions
--- cyrus-imapd-2.3.11/lib/imapoptions 2007-10-18 11:14:48.000000000 -0700
+++ cyrus-imapd-2.3.11.new/lib/imapoptions 2008-03-14 13:45:09.000000000 -0700
@@ -765,6 +765,10 @@
connections that these referrals would cause, thus resulting in a higher
authentication load on the respective backend server. */
+{ "proxyd_disable_mailbox_referrals", 0, SWITCH }
+/* Set to true to disable the use of mailbox-referrals on the
+ proxy servers. */
+
{ "proxyservers", NULL, STRING }
/* A list of users and groups that are allowed to proxy for other
users, separated by spaces. Any user listed in this will be