X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/2c0dfed5194f8639c512faa887442eb98cf70f11..c21d764bcfe32bd132afc92a0ecfd0f3938d7ebb:/gen/pobox.pc diff --git a/gen/pobox.pc b/gen/pobox.pc index 78bf157b..a1ee2ab0 100644 --- a/gen/pobox.pc +++ b/gen/pobox.pc @@ -64,7 +64,7 @@ int main(int argc, char **argv) EXEC SQL DECLARE x CURSOR FOR SELECT clearid, login - FROM users WHERE status != 3 AND potype != 'NONE' AND potype != 'SMTP'; + FROM users WHERE status != 3 AND potype != 'NONE'; EXEC SQL OPEN x; while (1) { @@ -79,35 +79,6 @@ int main(int argc, char **argv) EXEC SQL CLOSE x; - EXEC SQL DECLARE y CURSOR FOR SELECT - u.clearid, s.string - FROM users u, strings s - WHERE u.status != 3 and u.potype = 'SMTP' and u.box_id = s.string_id; - EXEC SQL OPEN y; - while (1) - { - EXEC SQL FETCH y INTO :id, :string; - if (sqlca.sqlcode) - break; - strtrim(string); - strtrim(id); - if (isdigit(id[0])) - { - if ((i = strlen(string)) > 7 && - !strcasecmp(".local", string + i - 6)) - { - string[i - 6] = '\0'; - fprintf(out, "%s %s.mit.edu\n", id, string); - } - else if (!strchr(string, '@')) - fprintf(out, "%s %s@mit.edu\n", id, string); - else - fprintf(out, "%s %s\n", id, string); - } - } - - EXEC SQL CLOSE y; - EXEC SQL COMMIT; if (fclose(out))