]> andersk Git - moira.git/blobdiff - gen/pobox.pc
output entries for IMAP poboxes too
[moira.git] / gen / pobox.pc
index c164080c7e2c7b984c0d134fc6f0ff2b264aa046..7c14c7121da43e7e982eada5813c4fa613c1ce24 100644 (file)
@@ -1,33 +1,40 @@
-/* $Header$
+/* $Id$
  *
  * This generates a list of everyone's poboxes for the mitdir.
  *
- *  (c) Copyright 1992 by the Massachusetts Institute of Technology.
- *  For copying and distribution information, please see the file
- *  <mit-copyright.h>.
+ * Copyright (C) 1992-1998 by the Massachusetts Institute of Technology.
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
  */
 
 #include <mit-copyright.h>
-#include <errno.h>
-#include <stdio.h>
 #include <moira.h>
-#include <sys/types.h>
+
 #include <sys/stat.h>
-#include <sys/time.h>
+#include <sys/types.h>
+
 #include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "util.h"
+
 EXEC SQL INCLUDE sqlca;
 
+RCSID("$Header$");
+
 char *whoami = "pobox.gen";
 char *db = "moira/moira";
 
 int main(int argc, char **argv)
 {
   FILE *out = stdout;
-  char *outf = NULL, outft[64];
+  char *outf = NULL, outft[MAXPATHLEN];
   struct stat sb;
   int flag, i;
   EXEC SQL BEGIN DECLARE SECTION;
-  char login[9], id[18], string[257];
+  char login[USERS_LOGIN_SIZE], id[USERS_CLEARID_SIZE];
+  char string[STRINGS_STRING_SIZE];
   EXEC SQL END DECLARE SECTION;
 
   EXEC SQL CONNECT :db;
@@ -69,7 +76,7 @@ int main(int argc, char **argv)
 
   EXEC SQL DECLARE x CURSOR FOR SELECT
     clearid, login
-    FROM users WHERE status != 3 and potype = 'POP';
+    FROM users WHERE status != 3 AND potype != 'NONE' AND potype != 'SMTP';
   EXEC SQL OPEN x;
   while (1)
     {
This page took 0.034873 seconds and 4 git commands to generate.