README (110560) | README (120256) |
---|---|
1This directory contains the source files for libmilter. 2 3The sendmail Mail Filter API (Milter) is designed to allow third-party 4programs access to mail messages as they are being processed in order to 5filter meta-information and content. 6 7This README file describes the steps needed to compile and run a filter, 8through reference to a sample filter which is attached at the end of this --- 413 unchanged lines hidden (view full) --- 422}; 423 424 425int 426main(argc, argv) 427 int argc; 428 char *argv[]; 429{ | 1This directory contains the source files for libmilter. 2 3The sendmail Mail Filter API (Milter) is designed to allow third-party 4programs access to mail messages as they are being processed in order to 5filter meta-information and content. 6 7This README file describes the steps needed to compile and run a filter, 8through reference to a sample filter which is attached at the end of this --- 413 unchanged lines hidden (view full) --- 422}; 423 424 425int 426main(argc, argv) 427 int argc; 428 char *argv[]; 429{ |
430 bool setconn = false; |
|
430 int c; 431 const char *args = "p:"; 432 433 /* Process command line options */ 434 while ((c = getopt(argc, argv, args)) != -1) 435 { 436 switch (c) 437 { 438 case 'p': 439 if (optarg == NULL || *optarg == '\0') 440 { 441 (void) fprintf(stderr, "Illegal conn: %s\n", 442 optarg); 443 exit(EX_USAGE); 444 } 445 (void) smfi_setconn(optarg); | 431 int c; 432 const char *args = "p:"; 433 434 /* Process command line options */ 435 while ((c = getopt(argc, argv, args)) != -1) 436 { 437 switch (c) 438 { 439 case 'p': 440 if (optarg == NULL || *optarg == '\0') 441 { 442 (void) fprintf(stderr, "Illegal conn: %s\n", 443 optarg); 444 exit(EX_USAGE); 445 } 446 (void) smfi_setconn(optarg); |
447 setconn = true; |
|
446 break; 447 448 } 449 } | 448 break; 449 450 } 451 } |
452 if (!setconn) 453 { 454 fprintf(stderr, "%s: Missing required -p argument\n", argv[0]); 455 exit(EX_USAGE); 456 } |
|
450 if (smfi_register(smfilter) == MI_FAILURE) 451 { 452 fprintf(stderr, "smfi_register failed\n"); 453 exit(EX_UNAVAILABLE); 454 } 455 return smfi_main(); 456} 457 458/* eof */ 459 | 457 if (smfi_register(smfilter) == MI_FAILURE) 458 { 459 fprintf(stderr, "smfi_register failed\n"); 460 exit(EX_UNAVAILABLE); 461 } 462 return smfi_main(); 463} 464 465/* eof */ 466 |
460$Revision: 8.35.2.1 $, Last updated $Date: 2002/10/21 14:31:57 $ | 467$Revision: 8.35.2.2 $, Last updated $Date: 2003/05/26 04:10:06 $ |