-/* $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;
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)
{