diff -ru bogom-1.9.2/milter.c bogom-1.9.3dev/milter.c --- bogom-1.9.2/milter.c 2008-06-26 06:47:40.000000000 +0900 +++ bogom-1.9.3dev/milter.c 2022-04-29 15:04:18.233560798 +0900 @@ -32,6 +32,7 @@ #include #include #include +#define SYSLOG_NAMES #include #include #include @@ -957,11 +958,14 @@ }; int opt; - const char *opts="hu:p:b:RDtvx:w:c:l:ds:f:q:S"; + const char *opts="hu:p:b:RDtvx:w:c:l:ds:f:q:SF:"; struct passwd *pw=NULL; struct stat st; + int i ; + int logFacility = LOG_DAEMON ; + while((opt=getopt(argc, argv, opts))!=-1) switch(opt) { @@ -1031,6 +1035,16 @@ case 'S': spamicity=1; break; + + case 'F': + for ( i = 0 ; facilitynames[i].c_name != NULL ; i ++ ) { + if ( strcmp( facilitynames[i].c_name, optarg ) == 0 ) { + logFacility = facilitynames[i].c_val ; + break; + } + } + break; + } /* read configuration file */ @@ -1302,7 +1316,7 @@ /* setup time to timezone */ tzset(); - openlog("bogom", LOG_PID | LOG_NDELAY, LOG_DAEMON); + openlog("bogom", LOG_PID | LOG_NDELAY, logFacility ); pidfile_fd=fopen(pidfile, "w"); if(!pidfile_fd)