#1007 new
Thomas Mangin

excluding imap folders

Reported by Thomas Mangin | January 9th, 2015 @ 10:13 AM

Hello,

I found this previous ticket http://freron.lighthouseapp.com/projects/58672/tickets/465-mailmate...

I would like to exclude some very large IMAP folder, they are like for this user, causing Mailmate to misbehave.

I was expecting them to be ignored as I "unticked" them in "subscriptions", but it seems that this preference was ignored and that the content was fetched anyway.

How should I go to make sure mailmate ignores these folders. I assume I also willl need to delete the content of the folder ( in ~/Library/Application Support/MailMate ) and find a way to reforce indexing.

( I am fine with editing the content of the State.plist file if this is the way to do )

Thank you.

Thomas

Comments and changes to this ticket

  • benny

    benny January 9th, 2015 @ 12:38 PM

    It sounds like you did the right thing and I don't know how/why it failed. Is this a server/service at which I can create a trial account and reproduce the issue myself?

    If you delete ~/Library/Application Support/MailMate then you'll more or less start over. If you just want to refetch/index emails then you delete these folders:

    ~/Library/Application Support/MailMate/Database.noindex
    ~/Library/Application Support/MailMate/Messages
    ~/Library/Application Support/MailMate/Attachments
    
  • Thomas Mangin

    Thomas Mangin January 9th, 2015 @ 01:39 PM

    Thank you for the quick answer.

    Sorry, this is with our Bluemind ( http://blue-mind.net ) server, which internally runs cyrus.
    I have only read access on the folders in question if it can help with trying to reproduce.

    I have already once deleted all the files and re-started from scratch. I used AppCleaner to remove MailMate, which removes the .app, Application Support/MailMate (and another file somewhere else).

    I then re-created the account and un-selected the relevant folders, I even marked them as "Offline" to try to make sure MailMate would not fetch them .. with no luck.

    Hence why I was wondering if something was wrong with the content of ~/Library/Application\ Support/MailMate/Messages/IMAP//State.plist, as I could not see anything in it saying that the folder should not be fetched ( and as the information for NoCount was stored there ).

    For example for one of them :

                "Dossiers partagés/customer.support" = {
                        attributes = "\\HasChildren";
                        fast_synchronization_time = 442503158;
                        highest_modseq = 20686;
                        last_seen_uid = 17925;
                        synchronization_time = 442503159;
                        uidnext = 17926;
                        uidvalidity = "1357646182";
                };
                "Dossiers partagés/customer.support/Sent" = {
                        attributes = "\\HasNoChildren";
                        fast_synchronization_time = 442503158;
                        highest_modseq = "2";
                        synchronization_time = 442503158;
                        uidnext = "1";
                        uidvalidity = "1378132263";
                };
    

    If you want to have a look at my machine, I could provide you with a TeamViewer access ( http://www.teamviewer.com/ ) if you want to contact me privately.

  • benny

    benny January 9th, 2015 @ 01:49 PM

    Hmm, I think it might be related to the use of é in the mailbox path. Perhaps MailMate is comparing an unencoded mailbox name with an encoded mailbox name. I'll have to check that (just surprised it hasn't come up before).

  • Thomas Mangin

    Thomas Mangin January 9th, 2015 @ 01:54 PM

    I thought it may be a problem of string comparaison due to unicode/UTF-8. If you want me to run a debug version of the code, also feel free :-)

    The imap.conf has :
    sharedprefix: Dossiers partag&AOk-s

  • benny

    benny January 9th, 2015 @ 01:54 PM

    I don't seem to be able to reproduce the problem.

    Do you unsubscribe server or client side?

    If client-side, take a look in this file to see if the mailbox(es) have been registered as unsubscribed:

    ~/Library/Application Support/MailMate/Sources.plist
    

    Note that mailbox children are not automatically unsubscribed. You cannot just unsubscribe “Dossiers partagés”.

  • Thomas Mangin

    Thomas Mangin January 9th, 2015 @ 01:55 PM

    My previous comment was marked as spam - hopefully you can still see it.

  • Thomas Mangin

    Thomas Mangin January 9th, 2015 @ 01:57 PM

    I unsubscribed client side, I want to be able to see those folders on the built-in webmail.

    On the other file, the name of the folder was localised it seems.

        sources = (
                        clientUnsubscribedMailboxNames = ( "Shared folders/10", "Shared folders/customer.provisioning", "Shared folders/customer.support",
                                "Shared folders/postmaster", "Shared folders/recording", "Shared folders/customer.care",
                                "Shared folders/educationalinterconnect", "Shared folders/accounts"
                        );
    
  • Thomas Mangin

    Thomas Mangin January 9th, 2015 @ 01:58 PM

    FYI - unsubscribing on Mail.app works as expected.

  • benny

    benny January 9th, 2015 @ 02:20 PM

    Localised? That makes no sense to me. As far as I know IMAP does not support any kind of localisation and MailMate does not try to translate anything itself. Somehow it becomes “Shared folders” instead of “Dossiers partagés”?

    You are sure it's not because both variants exist?

  • Thomas Mangin

    Thomas Mangin January 9th, 2015 @ 02:25 PM

    I copied and pasted a copy of the imap.conf previously but I am not sure you saw it as it was marked as spam. It has the following line:

    sharedprefix: Dossiers partag&AOk-s

    So cyrus is presenting the folder data not as "Shared Folder" but as "Dossiers partag...s"
    So the name was "localised" ( presented in the language of the user )

    Could it be that MailMate enumerate all the folder name and preprend "Shared Folder" without checking what the IMAP server is returning/using ?

  • benny

    benny January 9th, 2015 @ 09:59 PM

    But where does the name “Shared Folder” come from? It's not something that MailMate generates itself.

    Maybe it's a namespace returned by the server?

    Could you do as follows to generate some logs:

    • Open the Activity Viewer (⌥⌘0) in MailMate.
    • Take the account offline and then online.
    • Wait until it syncs and then use “Help ▸ Send Server Logs” to send me the logs.

    I can then see the LIST, LSUB, NAMESPACE, and any other commands/responses which might be relevant.

  • Thomas Mangin
  • Thomas Mangin

    Thomas Mangin January 10th, 2015 @ 06:06 PM

    with a brand new account using the creation wizard :

    * OK IMAP4 ready.
    B0 CAPABILITY.  
    * CAPABILITY IMAP4rev1 UIDPLUS XLIST QUOTA IDLE NAMESPACE AUTH=PLAIN STARTTLS.
    B0 OK completed.
    
    B1 AUTHENTICATE PLAIN.  
    B1 OK completed.
    
    B2 CAPABILITY.  
    * CAPABILITY IMAP4rev1 ID ENABLE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE LIST-EXTENDED WITHIN QRESYNC SCAN XLIST URLAUTH URLAUTH=BINARY AUTH=PLAIN SASL-IR IDLE STARTTLS.
    B2 OK completed.
    
    B3 ID ("name" "MailMate" "version" "r5035" "vendor" "Freron Software" "contact" "imap-id@freron.com").  
    * ID ("name" "Cyrus IMAPD" "version" "git2.4.17+0-BM-2.4.17-12923 23e1c017 2014-12-05" "vendor" "Project Cyrus" "support-url" "http://www.cyrusimap.org" "os" "Linux" "os-version" "3.2.0-72-generic" "environment" "Built w/Cyrus SASL 2.1.25; Running w/Cyrus SASL 2.1.25; Built w/Berkeley DB 5.1.25: (January 28, 2011); Running w/Berkeley DB 5.1.25: (January 28, 2011); Built w/OpenSSL 1.0.1 14 Mar 2012; Running w/OpenSSL 1.0.1 14 Mar 2012; Built w/zlib 1.2.3.4; Running w/zlib 1.2.3.4; CMU Sieve 2.4; TCP Wrappers; NET-SNMP; mmap = shared; lock = fcntl; nonblock = fcntl; idle = idled").
    B3 OK Completed.
    
    B4 NAMESPACE.  
    * NAMESPACE (("" "/")) (("Autres utilisateurs/" "/")) (("Dossiers partag&AOk-s/" "/")).
    B4 OK Completed.
    
    B5 LIST "" "*".  
    * LIST (\Noinferiors \HasNoChildren) "/" "INBOX".
    * LIST (\HasNoChildren) "/" "Drafts".
    * LIST (\HasNoChildren) "/" "Junk".
    * LIST (\HasNoChildren) "/" "Outbox".
    * LIST (\HasNoChildren) "/" "Sent".
    * LIST (\HasNoChildren) "/" "Trash".
    * LIST (\HasChildren) "/" "Shared folders/10".
    * LIST (\HasNoChildren) "/" "Shared folders/10/Sent".
    
    B6 LSUB "" "*".  
    * LSUB () "/" "Drafts".
    * LSUB () "/" "Junk".
    * LSUB () "/" "Outbox".
    * LSUB () "/" "Sent".
    * LSUB () "/" "Trash".
    B6 OK Completed (0.000 secs 5 calls).
    

    And the resulting window using the word "shared folders" in the picture included.

  • benny

    benny January 11th, 2015 @ 10:26 AM

    Based on that “Shared Folders” and “Dossiers partag&AOk-s/” are not the same thing. You should be able to unsubscribe from these with either the Server or Client setting. In fact, they are already unsubscribed server side according to the output, but the option below the list in the subscriptions editor makes MailMate ignore that.

    So, maybe the problem is that MailMate does not offer you any way of unsubscribing mailboxes in the “Dossiers partag&AOk-s/” namespace?

    I've kind of forgotten how this works (few servers use it), but I think by default MailMate shouldn't fetch mailboxes from the non-private namespace. There are hidden settings to change this behaviour. Have you changed that?

    defaults read com.freron.MailMate MmNonPrivateNamespacesEnabled
    
  • Thomas Mangin

    Thomas Mangin January 11th, 2015 @ 11:22 AM

    I think you got confused (sorry for that) due to my test : "shared folders" and "Dossiers partagees" are the same thing.

    I used a test user to perform a mail client setup (as I did not want to delete and recreate my user which has 10s of GB of mail to sync.

    For that test user, and to keep the IMAP output down, I only subscribed the user to one shared folder called "10", so all the other folders were not returned. For my personal user, all the folders are well being returned.

    I provided you this information as it demonstrated that the interface used "shared folders" at configuration time (which is surely where the name comes from in Sources.plist file) when this name was never returned by the IMAP server !

  • Thomas Mangin

    Thomas Mangin January 11th, 2015 @ 11:25 AM

    For information, when going back to subscription, the names which are in Sources.plist clientUnsubscribedMailboxNames are well "unticked" in the interface, so all is consistent there.

    I was thinking of editing and performing a search and replace in this list to replace "Shared folders" with "Dossiers Partagees" and I would need to delete the content of the mailbox ( removing the mailbox folders ).

    Then I would need to be able to force an index recreation from the cached content. Do you have a way for this please ?

  • benny

    benny January 11th, 2015 @ 12:17 PM

    @Thomas: Don't try hacking with these files. We need to figure out the origin of the problem. You write “this name was never returned by the IMAP server”, but that is not correct. In the output you provided above, the server returns these folders:

    * LIST (\HasChildren) "/" "Shared folders/10".
    * LIST (\HasNoChildren) "/" "Shared folders/10/Sent".
    

    These are the ones MailMate show you in the subscriptions interface and MailMate has no way of knowing whether or not they are related to “Dossiers Partagees”. MailMate doesn't even look for mailboxes in this namespace by default.

    For MailMate “Shared folders/10” is not different from e.g. “Sent”. They are both IMAP mailboxes in the private namespace.

    Does that help?

  • Thomas Mangin

    Thomas Mangin January 11th, 2015 @ 12:46 PM

    Benny,

    As it can not harm : this is how Mail.app perform the discovery (not at setup but when started once configured - if you need I can check the setup too)

    5.6 LIST "" ""  
    * LIST (\Noselect) "/" ""
    5.6 OK Completed (0.000 secs)
    
    6.11 LSUB "" *
    
    * LSUB (\Noinferiors) "/" INBOX
    * LSUB () "/" "Abuse Mail Received"
    * LSUB () "/" "Apple Mail To Do"
    * LSUB () "/" Archive
    * LSUB () "/" Bounce
    * LSUB () "/" "Deleted Messages"
    * LSUB () "/" Drafts
    * LSUB () "/" Junk
    * LSUB () "/" Notes
    * LSUB () "/" Outbox
    * LSUB (\HasChildren) "/" "Previous Years"
    * LSUB () "/" "Previous Years/2003"
    [...]
    * LSUB () "/" "Dossiers partag&AOk-s/exabgp"
    * LSUB () "/" "Dossiers partag&AOk-s/exaddos"
    * LSUB () "/" "Dossiers partag&AOk-s/exaproxy"
    * LSUB () "/" "Dossiers partag&AOk-s/exaripe"
    * LSUB () "/" "Dossiers partag&AOk-s/facebook"
    * LSUB () "/" "Dossiers partag&AOk-s/git"
    * LSUB (\HasChildren) "/" "Dossiers partag&AOk-s/plus"
    * LSUB () "/" "Dossiers partag&AOk-s/plus/Sent"
    6.11 OK Completed (0.000 secs 171 calls)
    
  • Thomas Mangin

    Thomas Mangin January 14th, 2015 @ 04:04 PM

    Hi,

    I had the following feedback from Bluemind when I shared with them the IMAP traces :

    From your logs, I can see 2 bugs :
    - we mistakenly identify the B0 tag from mailmate as outlook - the namespace command does not apply the translations correctly

    So I will wait for them to fix the issue in their code

  • benny

    benny January 14th, 2015 @ 08:51 PM

    Thanks for the update. Let me know if there is still an issue with MailMate when they have fixed it on their side. I believe this is the first time an issue might be fixed server side instead of me making a workaround :-)

  • Thomas Mangin

    Thomas Mangin April 24th, 2015 @ 01:14 PM

    Hello,

    After updating the mail server, the selection process now works correctly ( I can well select/unselect Shared Folders items and it retains the information). The content of clientUnsubscribedMailboxNames also seems to be valid :-)

    I deleted all previous mailmate files ( Library, Preferences, Cache ) and re-created the account ... but ...

    It seems that MailMate is ignoring this selection and is still displaying every the folder and it seems also downloading the content of at least some folders.

    It may be that the folder downloaded are the ones where sub-folders exists ( so it may well indeed not download the folder itself but the content of the sub-folders ).
    For example, clientUnsubscribedMailboxNames had in the list "Dossiers partagés/accounts.receivable" but the sub-folders were being downloaded.
    As a quick work around while we look into this issue, I changed all folder to be "offline".

    I would like to give MailMate another go, any advice to move forward would be appreciated.

    Thomas

  • benny

    benny April 24th, 2015 @ 08:59 PM

    That is how MailMate works. You have to explicitly unsubscribe each folder. (Holding down ⌥ when doing it might help if you need to unsubscribe most folders.)

    MailMate could auto-unsubscribe subfolders when disabling a folder, but this would be a bit less flexible. (IMAP itself works like MailMate. Unsubscribing a folder does not affect subfolders.)

    Thanks for giving MailMate another chance. Let me know if I didn't understand the question/problem correctly.

  • Thomas Mangin

    Thomas Mangin April 26th, 2015 @ 07:46 AM

    Hi Benny,

    The ⌥ trick made a big difference. Unsubscribing thousand of sub-folders is not really something I was looking forward to !

    All working as should ! Thank you for your help.

    Thomas

  • benny

    benny April 27th, 2015 @ 07:50 AM

    • State changed from “new” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages