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