7 # The following exit codes are defined and MUST BE CONSISTENT withh the
8 # error codes the library uses:
9 $MR_DBMS_ERR = 47836421;
10 $MR_OCONFIG = 47836460;
13 $outfile = '/moira/dcm/access.out';
15 $dbh = DBI->connect("dbi:Oracle:moira", "moira", "moira")
18 # Get the list of valid MIT.EDU user e-mail addresses
19 $sth = $dbh->prepare("SELECT login FROM users WHERE status != 3");
24 open(OUT, ">$outfile") || exit $MR_OCONFIG;
26 while(($login) = $sth->fetchrow_array) {
28 $users{$login} = $login;
30 print OUT "From:$login\@MIT.EDU RELAY\n";
33 # Get all the valid MIT.EDU mailing list addresses
34 $sth = $dbh->prepare("SELECT name FROM list WHERE active !=0 " .
39 while(($name) = $sth->fetchrow_array) {
42 # Ensure we do not re-print an entry that may be a personal user group
43 # and was already handled by the user e-mail addresses
45 print OUT "From:$name\@MIT.EDU RELAY\n";