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