Re: Outlook vs. Cyrus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good morning,


I work for an ISP. Outlook has problems in (according to what I have seen and reproduced) the following situations :


- You say it to rename a folder to a folder that already exists but that Outlook has not noticed yet of it's existence.

- It needs to access to a chained folder and in that chain some folder doesn't exist in the middle.

- Sync seems to get stuck for large mailboxes.


Apart from that, there is a new recent problem :

https://support.microsoft.com/en-us/office/outlook-search-not-showing-recent-emails-after-windows-update-kb5008212-cc5345cf-8007-403a-bb23-f3818653c2df


Having said that, we have patched our servers for avoiding the first two issues. With this patch, we have have no longer Outlook syncing issues and I would say the solution should go in that direction. We have written the patches for the 3.0.X versions. Apart from the patch, you need some way of notifying the user the final rename you have done due to the conflicted rename his Outlook asked. I mean, you need something more than a patch (for notifying users about the final and real folder rename and how to access it) but it's working.


For the third issue, the best thing you can do is, configure a new account in a new profile, stop periodic sync, launch a sync and let it sync and index the whole mailbox once. If you wait till this proccess ends, later syncing attempts would be normal or pretty fast (seconds). You can then re-enable periodic sync.


We transmitted this issues to Microsoft (through their tech forums), but they didn't gave us any kind of solution and the problem persists (without patching). It seems almost all of us have seen issues with Outlook but as I have never run Dovecot (Cyrus it's a extremely nice mail system) I was wondering how it deals with it (with Outlook)?. 


If you are curious I do attach the commented patch in this email.



Best regards,



 


El 2022-01-13 12:53, Jim Wallis escribió:


Whilst your topic is on thread, my reply isn't going to be, so apologies to everyone in advance for that.

When we used outlook as our email client pretty much all the problems we had were with the OST bloating to the maximum permitted size, at which point you can't even delete mail to reduce the size. This is because outlook keeps the local copies of everything on the IMAP server essentially in the one file. You can of course use PSTs to move mail off the IMAP server into smaller files on the local machine, but then they aren't accessible from anywhere which is surely the reason most of us choose IMAP over POP?

I do seem to recall there were some oddities with the way it handled some interactons with Cyrus, but as far as I could ever work out, the fundamental problem lies in outlook, and I think they happen no matter IMAP server you use, if you keep all your mail on the server.

One problem was users thinking they had created subfolders in the shared folders structure on the IMAP server, but which were actually not visible on the server (even to admins) and as far as I could tell only existed in the users OST and not online.

The work around I adopted was to switch from mailfile to maildir storage in the client, that is local cached copies are stored in a directory, one file per email, instead of all in one massive file - it probably takes up more disc space on the client machine, but it saves loading the entire cache to RAM every time you open your mail client, and it means you never end up with one file that is too big for either the client or OS to handle properly.

This feature was not in Outlook at the time, I convinced my boss to switch to Thunderbird in order to be able to use it. I am not sure if other mail clients have a maildir option now. Thunderbird has been working well for me for some time so I haven't done a recent review of other clients I don't think it fully implements everything cyrus is capable of providing so please don't take this as a promotion for that particular client, there may be better ones. It does seem to handle the shared folders properly as well.

I should add the the OST bloat issue was mainly one user, the boss, who receives hundreds if not thousands of emails per day because he signs up to every mailing list going and is terrible at spam management. I did get to a point where my own OST was sometimes doing it though as a result of sending large engineering files back and forth. The shared folder issues affected users with much smaller OSTs as well though.

So, as I said before not completely on topic because my solution to problems between Outlook and Cyrus was to ditch Outlook.

Regards

Jim

On 13/01/2022 11:08, Vladislav Kurz wrote:
Dear colleagues,

please what is your experience regarding cyrus and outlook (2016/365)?
We notice problems especially with users that have large and bushy mailboxes - >10 GB, >100 subfolders.

Specifically:

- sync gets stuck - one (sent) mail cannot be synced from outlook to cyrus, and that stops any further receiving and sending of mail. I was able to identify the problematic mail using communication dump (/var/lib/cyrus/log/username/) and after deleting it from outlook, sync recovered.

- other times deleting OST file and resyncing it from imap helped

- user with two mailboxes on the same server - one mailbox stopped being checked for new mail until outlook/computer was restarted. The other mailbox was checked all the time. Perhaps IDLE could help, but we were unable to find where to enable it in outlook.

- flaky search, AFAIK Outlook searches only using it's local cache, ignoring any search/squatter capabilities on the server.

- moving mail from one folder to another says "item cannot be moved, because the message was modified". After clicking on other mail and back it can be moved just fine.

And maybe other similar problems usually solved by restarting outlook, computer, deleting ost, or creating new clean outlook profile and starting over.

Have others found similar issues regarding outlook + cyrus (or any other imap server)?

Have you found some tweaks that could improve how outlook and cyrus cooperate?

Our imapd.conf extract:

altnamespace: no
unixhierarchysep: no
hashimapspool: true
search_engine: squat
delete_mode: immediate
expunge_mode: default

We are running cyrus 3.0.8 (debian 10), and considering upgrading to 3.2.6 (deb 11) or 3.4.2 (deb 11 + backports), or migrating to dovecot.

Do you have any experience if oulook works better newer versions of cyrus, or some other IMAP servers?


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Tcb883238f2de5034-Md3462bd8cb797e754ce2e8e2
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
--- ORIGINAL/imapd.c	2021-05-26 19:00:31.693661000 +0200
+++ PARCHEADO/imapd.c	2021-05-27 03:23:06.160393000 +0200
@@ -192,6 +192,12 @@
 static const char *plaintextloginalert = NULL;
 static int ignorequota = 0;
 
+/* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
+int es_outlook = 0;
+
+/* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
 #define QUIRK_SEARCHFUZZY (1<<0)
 static struct id_data {
     struct attvaluelist *params;
@@ -2595,6 +2601,13 @@
  */
 static void cmd_login(char *tag, char *user)
 {
+
+    /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+    
+    es_outlook = 0;
+
+    /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
     char userbuf[MAX_MAILBOX_BUFFER];
     char replybuf[MAX_MAILBOX_BUFFER];
     unsigned userlen;
@@ -3071,6 +3084,46 @@
         }
 
         syslog(LOG_INFO, "client id sessionid=<%s>:%s", session_id(), buf_cstring(&logbuf));
+
+        /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
+        char *regexString = "microsoft outlook";
+        char *regexString2 = "microsoft outlook for mac"; 
+        size_t maxMatches = 1;
+        size_t maxGroups = 1;
+        regex_t regexCompiled;
+        regex_t regexCompiled2;
+        regmatch_t groupArray[maxGroups];
+        regmatch_t groupArray2[maxGroups];
+
+        if (regcomp(&regexCompiled, regexString, REG_EXTENDED|REG_ICASE))
+        {
+            syslog(LOG_INFO, "NO PUEDO DETECTAR SI EL CLIENTE ES OUTLOOK....");
+        };
+
+        if (regcomp(&regexCompiled2, regexString2, REG_EXTENDED|REG_ICASE))
+        {
+            syslog(LOG_INFO, "NO PUEDO DETECTAR SI EL CLIENTE ES OUTLOOK....");
+        };
+
+        if (!regexec(&regexCompiled, buf_cstring(&logbuf), maxGroups, groupArray, 0))
+        {
+            if (regexec(&regexCompiled2, buf_cstring(&logbuf), maxGroups, groupArray2, 0))
+            {
+                syslog(LOG_INFO, "OUTLOOK PARA WINDOWS DETECTADO....");
+                es_outlook = 1;
+            }
+            else
+            {
+                syslog(LOG_INFO, "OUTLOOK DETECTADO PERO NO EL DE WINDOWS.... NO ACTUAMOS....");
+            }
+        }
+
+        regfree(&regexCompiled);
+        regfree(&regexCompiled2);
+
+        /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
         buf_free(&logbuf);
     }
 
@@ -4106,6 +4159,13 @@
     struct backend *backend_next = NULL;
     struct index_init init;
     int wasopen = 0;
+
+    /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+    
+    int buzon_outlook_creado = 0;
+
+    /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
     struct vanished_params *v = &init.vanished;
 
     memset(&init, 0, sizeof(struct index_init));
@@ -4342,6 +4402,38 @@
         if (init.vanishedlist) seqset_free(init.vanishedlist);
         init.vanishedlist = NULL;
         if (doclose) index_close(&imapd_index);
+
+        /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
+	int chequeo_crear_buzon = 1;
+
+	if (es_outlook)
+	{
+       	   chequeo_crear_buzon = mboxlist_createmailboxcheck(intname, 0, 0, 0, imapd_userid, imapd_authstate, NULL, NULL, 0);
+	}
+
+        if ((es_outlook) && (r == IMAP_MAILBOX_NONEXISTENT && chequeo_crear_buzon == 0))
+        {
+            buzon_outlook_creado = mboxlist_createmailbox(intname, 0, NULL, 0, imapd_userid, imapd_authstate, 1, 0, 0, 1, NULL);
+
+            if (!buzon_outlook_creado)
+            {
+                mboxlist_changesub(intname, imapd_userid, imapd_authstate, 1, 0, 1);
+                syslog(LOG_INFO, "CREANDO CARPETA %s PARA TENER OUTLOOK CONTENTO DE %s", name, imapd_userid);
+            }
+            else
+            {
+                syslog(LOG_INFO, "ERROR CREANDO CARPETA %s PARA TENER OUTLOOK CONTENTO DE %s", name, imapd_userid); 
+            }
+        }
+        else if (es_outlook)
+        {
+            syslog(LOG_INFO, "EVITAMOS CREAR CARPETA %s PARA TENER OUTLOOK CONTENTO DE %s porque r vale %d y chequeo crear buzon vale %d", name, imapd_userid, r, chequeo_crear_buzon); 
+        }
+
+
+        /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
         free(intname);
         return;
     }
@@ -7515,7 +7607,50 @@
     imapd_check(NULL, 0);
 
     if (r) {
-        prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+
+        /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
+        syslog(LOG_INFO, "PARTE RENAME");
+        char string_fallo_rename_existe[] = "Mailbox already exists";
+        char string_fallo_no_existe_origen[] = "Mailbox does not exist";
+        if((!strcmp(error_message(r), string_fallo_rename_existe)) && (es_outlook))
+        {
+            syslog(LOG_INFO, "PARTE RENAME 1111");
+            char *copia_nuevo_nombre;
+            copia_nuevo_nombre = (char*)malloc(strlen(newname)+500);
+            memset(copia_nuevo_nombre, '\0', strlen(newname)+300);
+            strncpy(copia_nuevo_nombre,newname,strlen(newname));
+ 
+            time_t rawtime;
+            struct tm * timeinfo;
+            char bufferaleat[80];
+            syslog(LOG_INFO, "PARTE RENAMEII");
+ 
+            time(&rawtime);
+            timeinfo = localtime(&rawtime);
+            strftime(bufferaleat,70,"SAREMAIL_CONFLICTO_%H%M%S_%d%m%Y",timeinfo);
+ 
+            syslog(LOG_INFO, "PARTE RENAMEIII");
+            strncat(copia_nuevo_nombre,bufferaleat,strlen(newname)+300-strlen(copia_nuevo_nombre)-1);
+            syslog(LOG_INFO, "DICIENTO AL OUTLOOK DE --%s-- QUE OK AL RENOMBRAR DE --%s-- A --%s-- PARA TENERLE CONTENTO YA QUE A --%s-- NO SE PUEDE PORQUE YA EXISTE", imapd_userid, oldname, copia_nuevo_nombre,newname); 
+            cmd_rename(tag, oldname, copia_nuevo_nombre, 0);
+            free(copia_nuevo_nombre);
+            syslog(LOG_INFO, "PARTE RENAMEIV");
+        }
+        else if ((!strcmp(error_message(r), string_fallo_no_existe_origen)) && (es_outlook))
+        {
+            syslog(LOG_INFO, "PARTE RENAME 2 1111");
+            syslog(LOG_INFO, "DICIENTO AL OUTLOOK DE --%s-- QUE OK AL RENOMBRAR DE --%s-- A --%s-- AUNQUE NO EXISTE EL ORIGEN Y NO SE PUEDE HACER, NO PASA NADA, TODO OK... PARA TENERLE CONTENTO", imapd_userid, oldname, newname);    
+            prot_printf(imapd_out, "%s OK %s\r\n", tag,
+                                    error_message(IMAP_OK_COMPLETED));
+        }
+        else
+        {
+            prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+        }
+
+        /* INTENTAR ARREGLAR PROBLEMA OUTLOOK */
+
     } else {
         if (config_mupdate_server)
             kick_mupdate();

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux