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

Diff of /mailutils/pop3d/pop3d.c

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

revision 1.37 by alainm, Sun Nov 11 19:25:36 2001 UTC revision 1.38 by gray, Tue Jan 15 21:51:39 2002 UTC
# Line 25  mailbox_t mbox; Line 25  mailbox_t mbox;
25  unsigned int timeout;  unsigned int timeout;
26  int state;  int state;
27  char *username;  char *username;
28    char *maildir = _PATH_MAILDIR;
29  FILE *ifile;  FILE *ifile;
30  FILE *ofile;  FILE *ofile;
31  char *md5shared;  char *md5shared;
# Line 36  static struct option long_options[] = Line 37  static struct option long_options[] =
37    {"daemon", optional_argument, 0, 'd'},    {"daemon", optional_argument, 0, 'd'},
38    {"help", no_argument, 0, 'h'},    {"help", no_argument, 0, 'h'},
39    {"inetd", no_argument, 0, 'i'},    {"inetd", no_argument, 0, 'i'},
40      {"maildir", required_argument, 0, 'm'},
41    {"port", required_argument, 0, 'p'},    {"port", required_argument, 0, 'p'},
42    {"timeout", required_argument, 0, 't'},    {"timeout", required_argument, 0, 't'},
43    {"version", no_argument, 0, 'v'},    {"version", no_argument, 0, 'v'},
44    {0, 0, 0, 0}    {0, 0, 0, 0}
45  };  };
46    
47  const char *short_options = "d::hip:t:v";  const char *short_options = "d::him:p:t:v";
48    
49  static int pop3d_mainloop       __P ((int, int));  static int pop3d_mainloop       __P ((int, int));
50  static void pop3d_daemon_init   __P ((void));  static void pop3d_daemon_init   __P ((void));
# Line 62  main (int argc, char **argv) Line 64  main (int argc, char **argv)
64    int c = 0;    int c = 0;
65    int status = OK;    int status = OK;
66    unsigned int port;    unsigned int port;
67      
68    port = 110;                   /* Default POP3 port.  */    port = 110;                   /* Default POP3 port.  */
69    timeout = 600;                /* Default timeout of 600.  */    timeout = 600;                /* Default timeout of 600.  */
70    
# Line 87  main (int argc, char **argv) Line 89  main (int argc, char **argv)
89            mode = INTERACTIVE;            mode = INTERACTIVE;
90            break;            break;
91    
92            case 'm':
93              maildir = optarg;
94              break;
95              
96          case 'p':          case 'p':
97            mode = DAEMON;            mode = DAEMON;
98            port = strtoul (optarg, NULL, 10);            port = strtoul (optarg, NULL, 10);
# Line 106  main (int argc, char **argv) Line 112  main (int argc, char **argv)
112          }          }
113      }      }
114    
115      maildir = mu_normalize_maildir (maildir);
116      if (!maildir)
117        {
118          mu_error ("Badly formed maildir: %s", maildir);
119          exit (1);
120        }
121                
122    /* 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.  */
123    gr = getgrnam ("mail");    gr = getgrnam ("mail");
124    if (gr == NULL)    if (gr == NULL)
# Line 124  main (int argc, char **argv) Line 137  main (int argc, char **argv)
137    {    {
138      list_t bookie;      list_t bookie;
139      registrar_get_list (&bookie);      registrar_get_list (&bookie);
140      /* list_append (bookie, mbox_record); */      list_append (bookie, mbox_record);
141      list_append (bookie, path_record);      list_append (bookie, path_record);
142    }    }
143    
# Line 449  pop3d_usage (char *argv0) Line 462  pop3d_usage (char *argv0)
462    printf ("                           of MAXCHILDREN child processes\n");    printf ("                           of MAXCHILDREN child processes\n");
463    printf ("  -h, --help               display this help and exit\n");    printf ("  -h, --help               display this help and exit\n");
464    printf ("  -i, --inetd              runs in inetd mode (default)\n");    printf ("  -i, --inetd              runs in inetd mode (default)\n");
465      printf ("  -m, --maildir=PATH       sets path to the mailspool directory\n");
466    printf ("  -p, --port=PORT          specifies port to listen on, implies -d\n"    printf ("  -p, --port=PORT          specifies port to listen on, implies -d\n"
467  );  );
468    printf ("                           defaults to 110, which need not be specified\n");    printf ("                           defaults to 110, which need not be specified\n");

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

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