On Mon, 12 Dec 2011, Andrew Morgan wrote:
In my test cyrus murder environment, which has frontends running 2.4.12, I
am still seeing mailbox referrals when I have
proxyd_disable_mailbox_referrals: 1 set in imapd.conf. Apparently this
was reported back in 2010:
http://lists.andrew.cmu.edu/pipermail/info-cyrus/2010-November/034092.html
It sounds like the original 2.3 patch wasn't ported forward to 2.4.
Does anyone have a patch for this against 2.4? The code is different
enough in 2.4 that the original 2.3 patch would need some work.
I worked up a simple patch against 2.4.12 which seems to work in my test
environment. See the attachment.
Honestly, I don't see what the variable disable_referalls really does
anymore. I'd remove it, but I don't understand how it is used in this
code in imap/imapd.c:
static const struct sasl_callback mysasl_cb[] = {
{ SASL_CB_GETOPT, &mysasl_config, NULL },
{ SASL_CB_PROXY_POLICY, &imapd_proxy_policy, (void*) &imapd_proxyctx },
{ SASL_CB_CANON_USER, &imapd_canon_user, (void*) &disable_referrals },
{ SASL_CB_LIST_END, NULL, NULL }
};
Nothing changes the value of disable_referrals that I can see. It is
initialized to 0.
Should I file a bug for this and attach my patch?
Thanks,
Andy
--- imap/imapd.c.orig 2011-10-04 12:53:03.000000000 -0700
+++ imap/imapd.c 2011-12-13 15:08:41.000000000 -0800
@@ -2819,7 +2819,7 @@
if (capa_is_disabled(base_capabilities[i].str))
continue;
/* Don't show "MAILBOX-REFERRALS" if disabled by config */
- if (disable_referrals &&
+ if (config_getswitch(IMAPOPT_PROXYD_DISABLE_MAILBOX_REFERRALS) &&
!strcmp(base_capabilities[i].str, "MAILBOX-REFERRALS"))
continue;
/* Don't show if they're not shown at this level of login */
@@ -5979,7 +5979,11 @@
clock_t start = clock();
char mytime[100];
- if (listargs->sel & LIST_SEL_REMOTE) supports_referrals = !disable_referrals;
+ if (listargs->sel & LIST_SEL_REMOTE) {
+ if (!config_getswitch(IMAPOPT_PROXYD_DISABLE_MAILBOX_REFERRALS)) {
+ supports_referrals = 1;
+ }
+ }
list_callback_calls = 0;
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/