ports/106602: mail/milter-regex always do syslog(LOG_DEBUG, ...)
Denis Eremenko <moonshade@pnhz.kz>
moonshade at pnhz.kz
Mon Dec 11 10:50:24 UTC 2006
>Number: 106602
>Category: ports
>Synopsis: mail/milter-regex always do syslog(LOG_DEBUG, ...)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 11 10:50:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Denis Eremenko <moonshade at pnhz.kz>
>Release: FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD 6.2-PRERELEASE #0: Tue Dec 5 14:17:41 ALMT 2006
root at abyss.pnhz.kz:/usr/obj/data/os/FreeBSD/src/6/src/sys/ABYSS-6
>Description:
mail/milter-regex always do syslog(LOG_DEBUG, ...) spamming /var/log/debug.log with each message passing through.
It should be optional.
>How-To-Repeat:
just use it
>Fix:
--- patch-no-log_debug begins here ---
--- milter-regex.c.orig Mon Dec 11 15:42:26 2006
+++ milter-regex.c Mon Dec 11 15:52:23 2006
@@ -57,6 +57,7 @@
static const char *rule_file_name = "/etc/milter-regex.conf";
static int debug = 0;
+static int verbose = 0;
struct context {
struct ruleset *rs;
@@ -520,6 +521,9 @@
va_list ap;
char msg[8192];
+ if (!verbose)
+ return;
+
va_start(ap, fmt);
if (context != NULL)
snprintf(msg, sizeof(msg), "%s: ", context->host_addr);
@@ -563,13 +567,16 @@
tzset();
openlog("milter-regex", LOG_PID | LOG_NDELAY, LOG_DAEMON);
- while ((ch = getopt(argc, argv, "c:dp:u:")) != -1) {
+ while ((ch = getopt(argc, argv, "c:dvp:u:")) != -1) {
switch (ch) {
case 'c':
rule_file_name = optarg;
break;
case 'd':
- debug = 1;
+ debug = verbose = 1;
+ break;
+ case 'v':
+ verbose = 1;
break;
case 'p':
oconn = optarg;
--- milter-regex.8.orig Sat Mar 13 23:21:23 2004
+++ milter-regex.8 Mon Dec 11 15:58:25 2006
@@ -51,7 +51,9 @@
.Bl -tag -width "-c config"
.It Fl d
Don't detach from controlling terminal and produce verbose debug
-output on stdout.
+output on stdout. Implies -v.
+.It Fl v
+Do verbose LOG_DEBUG level logging.
.It Fl c Ar config
Use the specified configuration file instead of the default,
/etc/milter-regex.conf.
--- patch-no-log_debug ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list