/[mailutils]/mailutils/imap4d/imap4d.c
ViewVC logotype

Diff of /mailutils/imap4d/imap4d.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by alainm, Sun Nov 11 19:25:36 2001 UTC revision 1.14 by gray, Tue Jan 15 21:51:39 2002 UTC
# Line 25  FILE *ofile; Line 25  FILE *ofile;
25  unsigned int timeout = 1800; /* RFC2060: 30 minutes, if enable.  */  unsigned int timeout = 1800; /* RFC2060: 30 minutes, if enable.  */
26  mailbox_t mbox;  mailbox_t mbox;
27  char *homedir;  char *homedir;
28    char *maildir = _PATH_MAILDIR;
29  int state = STATE_NONAUTH;  int state = STATE_NONAUTH;
30    
31  /* Number of child processes.  */  /* Number of child processes.  */
# Line 35  static struct option long_options[] = Line 36  static struct option long_options[] =
36    {"daemon", optional_argument, 0, 'd'},    {"daemon", optional_argument, 0, 'd'},
37    {"help", no_argument, 0, 'h'},    {"help", no_argument, 0, 'h'},
38    {"inetd", no_argument, 0, 'i'},    {"inetd", no_argument, 0, 'i'},
39      {"maildir", required_argument, 0, 'm'},
40    {"port", required_argument, 0, 'p'},    {"port", required_argument, 0, 'p'},
41    {"other-namespace", required_argument, 0, 'O'},    {"other-namespace", required_argument, 0, 'O'},
42    {"shared-namespace", required_argument, 0, 'S'},    {"shared-namespace", required_argument, 0, 'S'},
# Line 43  static struct option long_options[] = Line 45  static struct option long_options[] =
45    {0, 0, 0, 0}    {0, 0, 0, 0}
46  };  };
47    
48  const char *short_options ="d::hip:t:vO:P:S:";  const char *short_options ="d::him:p:t:vO:P:S:";
49    
50  static int imap4d_mainloop      __P ((int, int));  static int imap4d_mainloop      __P ((int, int));
51  static void imap4d_daemon_init  __P ((void));  static void imap4d_daemon_init  __P ((void));
# Line 90  main (int argc, char **argv) Line 92  main (int argc, char **argv)
92            mode = INTERACTIVE;            mode = INTERACTIVE;
93            break;            break;
94    
95            case 'm':
96              maildir = optarg;
97              break;
98              
99          case 'p':          case 'p':
100            mode = DAEMON;            mode = DAEMON;
101            port = strtoul (optarg, NULL, 10);            port = strtoul (optarg, NULL, 10);
# Line 117  main (int argc, char **argv) Line 123  main (int argc, char **argv)
123          }          }
124      }      }
125    
126      maildir = mu_normalize_maildir (maildir);
127      if (!maildir)
128        {
129          mu_error ("Badly formed maildir: %s", maildir);
130          exit (1);
131        }
132    
133    /* First we want our group to be mail so we can access the spool.  */    /* First we want our group to be mail so we can access the spool.  */
134    gr = getgrnam ("mail");    gr = getgrnam ("mail");
135    if (gr == NULL)    if (gr == NULL)
# Line 135  main (int argc, char **argv) Line 148  main (int argc, char **argv)
148    {    {
149      list_t bookie;      list_t bookie;
150      registrar_get_list (&bookie);      registrar_get_list (&bookie);
151      /* list_append (bookie, mbox_record); */      list_append (bookie, mbox_record);
152      list_append (bookie, path_record);      list_append (bookie, path_record);
153    }    }
154    
# Line 347  imap4d_usage (char *argv0) Line 360  imap4d_usage (char *argv0)
360  {  {
361    printf ("Usage: %s [OPTIONS]\n", argv0);    printf ("Usage: %s [OPTIONS]\n", argv0);
362    printf ("Runs the GNU IMAP4 daemon.\n\n");    printf ("Runs the GNU IMAP4 daemon.\n\n");
363    printf ("  -d, --daemon=MAXCHILDREN runs in daemon mode with a maximum\n");    printf ("  -d, --daemon[=MAXCHILDREN] runs in daemon mode with a maximum\n");
364    printf ("                           of MAXCHILDREN child processes\n");    printf ("                           of MAXCHILDREN child processes\n");
365      printf ("                           MAXCHILDREN defaults to %d\n",
366              DEFMAXCHILDREN);
367    printf ("  -h, --help               display this help and exit\n");    printf ("  -h, --help               display this help and exit\n");
368    printf ("  -i, --inetd              runs in inetd mode (default)\n");    printf ("  -i, --inetd              runs in inetd mode (default)\n");
369    printf ("  -p, --port=PORT          specifies port to listen on, implies -d\n"    printf ("  -p, --port=PORT          specifies port to listen on, implies -d\n"
370  );  );
371    printf ("                           defaults to 143, which need not be specified\n");    printf ("                           defaults to 143, which need not be specified\n");
372      printf ("  -m, --maildir=PATH       set path to the mailspool directory\n");
373      printf ("  -O, --other-namespace=PATHLIST  sets the `other' namespace\n");
374      printf ("  -S, --shared-namespace=PATHLIST sets the `shared' namespace\n");
375    printf ("  -t, --timeout=TIMEOUT    sets idle timeout to TIMEOUT seconds\n");    printf ("  -t, --timeout=TIMEOUT    sets idle timeout to TIMEOUT seconds\n");
376    printf ("                           TIMEOUT default is 1800 (30 minutes)\n");    printf ("                           TIMEOUT default is 1800 (30 minutes)\n");
377    printf ("  -v, --version            display version information and exit\n");    printf ("  -v, --version            display version information and exit\n");

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26