- openlog("spamass-milter", LOG_PID, LOG_MAIL);
-
- /* Process command line options */
- while ((c = getopt(argc, argv, args)) != -1) {
- switch (c) {
- case 'f':
- dofork = true;
- break;
- case 'd':
- parse_debuglevel(optarg);
- break;
- case 'D':
- spamdhost = strdup(optarg);
- break;
- case 'e':
- flag_full_email = true;
- defaultdomain = strdup(optarg);
- break;
- case 'i':
- debug(D_MISC, "Parsing ignore list");
- parse_networklist(optarg, &ignorenets);
- break;
- case 'm':
- dontmodifyspam = true;
- smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
- break;
- case 'M':
- dontmodify = true;
- dontmodifyspam = true;
- smfilter.xxfi_flags &= ~(SMFIF_CHGBODY|SMFIF_CHGHDRS);
- break;
- case 'p':
- sock = strdup(optarg);
- break;
- case 'P':
- pidfilename = strdup(optarg);
- break;
- case 'r':
- flag_reject = true;
- reject_score = atoi(optarg);
- break;
- case 'u':
- flag_sniffuser = true;
- defaultuser = strdup(optarg);
- break;
- case 'b':
- case 'B':
- if (flag_bucket)
- {
- fprintf(stderr, "Can only have one -b or -B flag\n");
- err = 1;
- break;
- }
- flag_bucket = true;
- if (c == 'b')
- {
- flag_bucket_only = true;
- smfilter.xxfi_flags |= SMFIF_DELRCPT; // May delete recipients
- }
- // we will modify the recipient list; if spamc returns
- // indicating that this mail is spam, the message will be
- // sent to <optarg>@localhost
- smfilter.xxfi_flags |= SMFIF_ADDRCPT; // May add recipients
- // XXX we should probably verify that optarg is vaguely sane
- spambucket = strdup( optarg );
- break;
- case 'x':
- flag_expand = true;
- break;
- case '?':
- err = 1;
- break;
- }
- }
+ openlog("spamass-milter", LOG_PID, LOG_MAIL);
+
+
+ /* Process command line options */
+ while ((c = getopt(argc, argv, args)) != -1) {
+ switch (c) {
+ case 'a':
+ auth = true;
+ break;
+ case 'f':
+ dofork = true;
+ break;
+ case 'd':
+ parse_debuglevel(optarg);
+ break;
+ case 'D':
+ spamdhost = strdup(optarg);
+ break;
+ case 'e':
+ flag_full_email = true;
+ defaultdomain = strdup(optarg);
+ break;
+ case 'i':
+ debug(D_MISC, "Parsing ignore list");
+ parse_networklist(optarg, &ignorenets);
+ break;
+ case 'm':
+ dontmodifyspam = true;
+ smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
+ break;
+ case 'M':
+ dontmodify = true;
+ dontmodifyspam = true;
+ smfilter.xxfi_flags &= ~(SMFIF_CHGBODY|SMFIF_CHGHDRS);
+ break;
+ case 'p':
+ sock = strdup(optarg);
+ break;
+ case 'P':
+ pidfilename = strdup(optarg);
+ break;
+ case 'r':
+ flag_reject = true;
+ reject_score = atoi(optarg);
+ break;
+ case 'S':
+ path_to_sendmail = strdup(optarg);
+ break;
+ case 'C':
+ rejectcode = strdup (optarg);
+ break;
+ case 'R':
+ rejecttext = strdup (optarg);
+ break;
+ case 'u':
+ flag_sniffuser = true;
+ defaultuser = strdup(optarg);
+ break;
+ case 'b':
+ case 'B':
+ if (flag_bucket)
+ {
+ fprintf(stderr, "Can only have one -b or -B flag\n");
+ err = 1;
+ break;
+ }
+ flag_bucket = true;
+ if (c == 'b')
+ {
+ flag_bucket_only = true;
+ smfilter.xxfi_flags |= SMFIF_DELRCPT; // May delete recipients
+ }
+ // we will modify the recipient list; if spamc returns
+ // indicating that this mail is spam, the message will be
+ // sent to <optarg>@localhost
+ smfilter.xxfi_flags |= SMFIF_ADDRCPT; // May add recipients
+ // XXX we should probably verify that optarg is vaguely sane
+ spambucket = strdup( optarg );
+ break;
+ case 'x':
+ flag_expand = true;
+ break;
+ case '?':
+ err = 1;
+ break;
+ }
+ }