cf58a5
diff -Naur cyrus-imapd-2.3.1.orig/imap/sync_commit.c cyrus-imapd-2.3.1/imap/sync_commit.c
cf58a5
--- cyrus-imapd-2.3.1.orig/imap/sync_commit.c	2005-12-13 16:31:10.000000000 +0100
cf58a5
+++ cyrus-imapd-2.3.1/imap/sync_commit.c	2006-01-25 10:18:50.000000000 +0100
cf58a5
@@ -834,9 +834,15 @@
cf58a5
     /* Must be atleast MAX_PARTITION_LEN + 30 for partition, need
cf58a5
      * MAX_PARTITION_LEN + HOSTNAME_SIZE + 2 for mupdate location */
cf58a5
     char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
cf58a5
+    char *mbox = name;
cf58a5
+    char *p;
cf58a5
 
cf58a5
     /* Need an extra sanity check here as normal ACL logic is bypassed */
cf58a5
-    r = mboxname_policycheck(name);
cf58a5
+    if (config_virtdomains && (p = strchr(name, '!'))) {
cf58a5
+        /* pointer to mailbox w/o domain prefix */
cf58a5
+        mbox = p + 1;
cf58a5
+    }
cf58a5
+    r = mboxname_policycheck(mbox);
cf58a5
     if (r) return r;
cf58a5
 
cf58a5
     if (!uniqueid) {