Georg Sauthoff <[EMAIL PROTECTED]> wrote:

> how do I move mail via 'movemail' from an existing mbox file to a
> non-existing maildir destination?

Use this patch:

Index: mailbox/amd.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/mailbox/amd.c,v
retrieving revision 1.21
diff -p -u -r1.21 amd.c
--- mailbox/amd.c       27 Jun 2006 13:10:37 -0000      1.21
+++ mailbox/amd.c       19 Dec 2006 14:21:42 -0000
@@ -332,8 +332,18 @@ amd_open (mu_mailbox_t mailbox, int flag
 
   mailbox->flags = flags;
   if (stat (amd->name, &st) < 0)
-    return errno;
-
+    {
+      if ((flags & MU_STREAM_CREAT) && errno == ENOENT)
+       {
+         if (mkdir (amd->name, S_IRUSR|S_IWUSR|S_IXUSR))
+           return errno;
+         if (stat (amd->name, &st) < 0)
+           return errno;
+       }
+      else
+       return errno;
+    }
+  
   if (!S_ISDIR (st.st_mode))
     return EINVAL;
 

Reagards,
Sergey
 


_______________________________________________
Bug-mailutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to