|
|
1.1 ! root 1: #include <stdio.h> ! 2: #include "smtp.h" ! 3: #include "sys.h" ! 4: ! 5: int norun; ! 6: int log; ! 7: int debug = 0; ! 8: ! 9: char *progname, *helohost, *thishost; ! 10: extern char *sysname_read(); ! 11: ! 12: ! 13: main(argc, argv) ! 14: char *argv[]; ! 15: { ! 16: int c; ! 17: extern int optind; ! 18: extern char *optarg; ! 19: ! 20: progname = argv[0]; ! 21: Openlog("smtpd", LOG_PID, LOG_SMTPD); ! 22: setlogmask(LOG_UPTO(LOG_INFO)); ! 23: ! 24: umask(2); ! 25: ! 26: while((c = getopt(argc, argv, "H:h:DnL:")) != EOF) { ! 27: switch(c) { ! 28: ! 29: case 'H': helohost = optarg; break; ! 30: case 'h': thishost = optarg; break; ! 31: case 'L': setloglevel(optarg); break; ! 32: case 'n': norun++; ! 33: case 'D': debug++; break; ! 34: case '?': ! 35: default: ! 36: Syslog(LOG_CRIT, "%s: usage\n", progname); ! 37: exit(2); ! 38: } ! 39: } ! 40: if(helohost == NULL) ! 41: helohost=sysname_read(); ! 42: converse(stdin, stdout); ! 43: /* NOTREACHED */ ! 44: return 0; ! 45: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.