cf58a5
diff -Naur cyrus-imapd-2.3.1.orig/imap/make_md5.c cyrus-imapd-2.3.1/imap/make_md5.c
cf58a5
--- cyrus-imapd-2.3.1.orig/imap/make_md5.c	2005-12-13 16:31:08.000000000 +0100
cf58a5
+++ cyrus-imapd-2.3.1/imap/make_md5.c	2006-01-18 20:21:14.000000000 +0100
cf58a5
@@ -391,7 +391,13 @@
cf58a5
     FILE *file;
cf58a5
     int i;
cf58a5
 
cf58a5
-    if ((file=fopen(name, "w")) == NULL)
cf58a5
+    file = fopen(name, "w");
cf58a5
+    if (file == NULL && errno == ENOENT) {
cf58a5
+        if (cyrus_mkdir(name, 0750) == 0) {
cf58a5
+            file = fopen(name, "w");
cf58a5
+        }
cf58a5
+    }
cf58a5
+    if (file == NULL)
cf58a5
         return(IMAP_IOERROR);
cf58a5
 
cf58a5
     for (mailbox = list->head ; mailbox ; mailbox = mailbox->next) {