Re: mailbox referrals in 2.4.12

2011-12-14 Thread Andrew Morgan

On Wed, 14 Dec 2011, Wesley Craig wrote:


On 13 Dec 2011, at 19:15, Andrew Morgan wrote:
Nothing changes the value of disable_referrals that I can see.  It is 
initialized to 0.


disable_referrals devolves to domain_from_ip in canonify_userid() in 
global.c.  I gather it's set when virtdomains is set "on".  Presumably 
this is necessary because when virtdomains is "on", the domain is 
determined by the IP of the interface -- if you were to refer that 
connection, the original interface address would be lost.  No idea if 
anyone is using that code...


In that case, I should keep the original behavior in cmd_list.  Here is an 
updated patch that still honors disable_referrals when setting 
supports_referrals.


Andy--- imap/imapd.c.orig	2011-10-04 12:53:03.0 -0700
+++ imap/imapd.c	2011-12-14 10:32:54.0 -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 = !disable_referrals;
+	}
+}
 
 list_callback_calls = 0;
 

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Re: mailbox referrals in 2.4.12

2011-12-14 Thread Andrew Morgan
On Wed, 14 Dec 2011, Wolfgang Breyha wrote:

> Andrew Morgan wrote, on 14.12.2011 01:15:
>> I worked up a simple patch against 2.4.12 which seems to work in my test
>> environment.  See the attachment.
>
> Wouldn't it be cleaner to remove the whole option
> "proxyd_disable_mailbox_referrals" and use
> suppress_capabilities: MAILBOX-REFERRALS
> on the proxy servers instead?

If you trust the client to honor that...  :)

Anytime a client issues RLIST, RSUB, or LIST (REMOTE) commands, Cyrus 
turns on referrals.  I want to make sure that Cyrus never issues a mailbox 
referral.

Andy

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: SIEVE Scripts on a shared folder

2011-12-14 Thread Adam Tauno Williams
On Wed, 2011-12-14 at 11:04 -0500, Adam Tauno Williams wrote:
> On Tue, 2011-10-04 at 21:30 -0400, Adam Tauno Williams wrote:
> > Quoting "Jeroen van Meeuwen (Kolab Systems)" :
> > > Adam Tauno Williams wrote:
> > >> cyrus-imapd-2.3.14-8
> > >> I've done this before, but now I'm stumped [possibly Friday induced
> > >> brain fade].  I'm trying to set a SIEVE script on a shared folder.
> > > Now that you mention it, I find that indeed the sieve script I was trying 
> > > to
> > > use does not work... ;-)
> > > 2.3.16 for me.
> > Have you tried this on a 2.4.x version?
> Nope, still doesn't work.
> sardine.mormail.com> mboxcfg {folderName} sieve deleteTestSubject.sieve
> sardine.mormail.com> info {folderName}
> {{folderName}}:
>   duplicatedeliver: false
>   lastpop:  
>   lastupdate: 14-Dec-2011 10:17:49 -0500
>   partition: default
>   pop3newuidl: true
>   sharedseen: false
>   sieve: deleteTestSubject.sieve
>   size: 194259
> require ["imapflags"];
> if header :comparator "i;ascii-casemap" :is "Subject" "TEST"  {
> addflag "\\Deleted";
> keep;
> stop;
> Sent a message to the folder with a subject of "TEST"... and it is not
> deleted.

Eh, my version is currently -

cyrus-imapd-2.4.12-2
cyrus-imapd-utils-2.4.12-2



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: mailbox referrals in 2.4.12

2011-12-14 Thread Wolfgang Breyha
Andrew Morgan wrote, on 14.12.2011 01:15:
> I worked up a simple patch against 2.4.12 which seems to work in my test 
> environment.  See the attachment.

Wouldn't it be cleaner to remove the whole option
"proxyd_disable_mailbox_referrals" and use
suppress_capabilities: MAILBOX-REFERRALS
on the proxy servers instead?

Greetings, Wolfgang
-- 
Wolfgang Breyha  | http://www.blafasel.at/
Vienna University Computer Center | Austria


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: SIEVE Scripts on a shared folder

2011-12-14 Thread Adam Tauno Williams
On Tue, 2011-10-04 at 21:30 -0400, Adam Tauno Williams wrote:
> Quoting "Jeroen van Meeuwen (Kolab Systems)" :
> > Adam Tauno Williams wrote:
> >> cyrus-imapd-2.3.14-8
> >> I've done this before, but now I'm stumped [possibly Friday induced
> >> brain fade].  I'm trying to set a SIEVE script on a shared folder.
> > Now that you mention it, I find that indeed the sieve script I was trying to
> > use does not work... ;-)
> > 2.3.16 for me.
> Have you tried this on a 2.4.x version?

Nope, still doesn't work.

sardine.mormail.com> mboxcfg {folderName} sieve deleteTestSubject.sieve
sardine.mormail.com> info {folderName}
{{folderName}}:
  duplicatedeliver: false
  lastpop:  
  lastupdate: 14-Dec-2011 10:17:49 -0500
  partition: default
  pop3newuidl: true
  sharedseen: false
  sieve: deleteTestSubject.sieve
  size: 194259

require ["imapflags"];
if header :comparator "i;ascii-casemap" :is "Subject" "TEST"  {
addflag "\\Deleted";
keep;
stop;

Sent a message to the folder with a subject of "TEST"... and it is not
deleted.



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: mailbox referrals in 2.4.12

2011-12-14 Thread Wesley Craig
On 13 Dec 2011, at 19:15, Andrew Morgan wrote:
> Nothing changes the value of disable_referrals that I can see.  It is 
> initialized to 0.

disable_referrals devolves to domain_from_ip in canonify_userid() in global.c.  
I gather it's set when virtdomains is set "on".  Presumably this is necessary 
because when virtdomains is "on", the domain is determined by the IP of the 
interface -- if you were to refer that connection, the original interface 
address would be lost.  No idea if anyone is using that code...

:wes

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/