]> andersk Git - moira.git/commitdiff
ask if we want to create the filesystem when setting an IMAP pobox,
authorzacheiss <zacheiss>
Wed, 29 Mar 2000 20:04:12 +0000 (20:04 +0000)
committerzacheiss <zacheiss>
Wed, 29 Mar 2000 20:04:12 +0000 (20:04 +0000)
instead of always creating it.

clients/moira/pobox.c

index dc820cabc51f0062fa9c69082730fda1c2878073..7489fb26388c5613da4bb3110308315d5dd9e41f 100644 (file)
@@ -462,8 +462,19 @@ int SetUserPOBox(int argc, char **argv)
            {
              free(type);
              type = "IMAP";
-             if ((box = CreateImapBox(local_user)) == (char *) SUB_ERROR)
-               return DM_NORMAL;
+             switch (YesNoQuestion("Create IMAP filesystem (y/n)", TRUE))
+               {
+               case TRUE:
+                 if ((box = CreateImapBox(local_user)) == (char *) SUB_ERROR)
+                   return DM_NORMAL;
+                 break;
+               case FALSE:
+                 box = malloc(strlen(local_user) + 4);
+                 sprintf(box, "%s.po", local_user);
+                 break;
+               default:
+                 return DM_NORMAL;
+               }
            }
          else
            {
This page took 0.037595 seconds and 5 git commands to generate.