Re: Problems with \Noselect folders in cyrus-imap 3.4

Ben Müller <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Hello,

I took a closer look at closer look at mbexamine in version 3.4.9.

On 8/8/24 15:59, Michael Menge wrote:
> 
> 2. mbexamine stops after hitting the \Noselect folder
>     and does not process later folders
> 
>> # mbexamine -C /etc/imapd_be.conf user/zrstes8* | grep -A2 -e Exami
>> Examining user/zrstes8... Mailbox Header Info:
>>   Path to mailbox: /srv/cyrus-be/ssd-part/B/user/zrstes8
>>  Mailbox ACL: zrstes8    lrswipkxtecda
>> -- 
>> Examining user/zrstes8/bla...
> 
> After creating the folder bla mbexamine does examine all folders
> 

The behavior can be fixed with the following patch:

--- cyrus-imapd-3.4.9/imap/mbexamine.c	2024-07-29 05:06:10.000000000 +0200
+++ cyrus-imapd-3.4.9_patched/imap/mbexamine.c	2024-09-20 
10:38:49.532000000 +0200
@@ -196,6 +196,7 @@
      /* don't want partial matches */
      if (!data) return 0;
      if (!data->is_exactmatch) return 0;
+    if (data->mbentry->mbtype == MBTYPE_INTERMEDIATE) return 0;

      signals_poll();

@@ -368,6 +369,7 @@
      /* don't want partial matches */
      if (!data) return 0;
      if (!data->is_exactmatch) return 0;
+    if (data->mbentry->mbtype == MBTYPE_INTERMEDIATE) return 0;

      signals_poll();

@@ -439,6 +441,7 @@
      /* don't want partial matches */
      if (!data) return 0;
      if (!data->is_exactmatch) return 0;
+    if (data->mbentry->mbtype == MBTYPE_INTERMEDIATE) return 0;

      signals_poll();


The funcions "do_examine", "do_quota" and "do_compare" need to stop if 
they are called with a non-existing folder.

I hope, this helps to solve the other issues too.
-- 
Ben Müller
Universität Tübingen
Zentrum für Datenverarbeitung
Abt. Zentrale Systeme
Wächterstraße 76, 72074 Tübingen
Tel: +49 (0) 7071 – 29 70325
E-Mail: ben.mueller(at)uni-tuebingen.de


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T72d2e03305c67431-Maeeca833e8aa7e34aebb86db
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
smime.p7s (application/pkcs7-signature, 5.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.