pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/greylisting-spp Log tuples if VERBOSE/DEBUG, as t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/12c032161a8f
branches:  trunk
changeset: 326764:12c032161a8f
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Dec 14 07:19:39 2018 +0000

description:
Log tuples if VERBOSE/DEBUG, as the README suggests it does. Bump PKGREVISION.

diffstat:

 mail/greylisting-spp/Makefile                            |   2 +-
 mail/greylisting-spp/distinfo                            |   4 +-
 mail/greylisting-spp/patches/patch-src_commonstuff.h     |  48 ++++++++++++++++
 mail/greylisting-spp/patches/patch-src_greylisting-spp.c |  28 +++++++++
 4 files changed, 80 insertions(+), 2 deletions(-)

diffs (109 lines):

diff -r 81db8b7d2d36 -r 12c032161a8f mail/greylisting-spp/Makefile
--- a/mail/greylisting-spp/Makefile     Fri Dec 14 06:55:07 2018 +0000
+++ b/mail/greylisting-spp/Makefile     Fri Dec 14 07:19:39 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/12/09 18:52:35 adam Exp $
+# $NetBSD: Makefile,v 1.3 2018/12/14 07:19:39 schmonz Exp $
 
 DISTNAME=              greylisting-spp-1.1
 PKGREVISION=           1
diff -r 81db8b7d2d36 -r 12c032161a8f mail/greylisting-spp/distinfo
--- a/mail/greylisting-spp/distinfo     Fri Dec 14 06:55:07 2018 +0000
+++ b/mail/greylisting-spp/distinfo     Fri Dec 14 07:19:39 2018 +0000
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2018/12/14 07:19:39 schmonz Exp $
 
 SHA1 (greylisting-spp-1.1.tar.gz) = 648cfcb135619635e38a84c4c7316cba35d929e5
 RMD160 (greylisting-spp-1.1.tar.gz) = 91b2a46130070a92913c7e399004d86ad524a940
 SHA512 (greylisting-spp-1.1.tar.gz) = 7797c98243283f7ef8985df7f0525502f14b871f5d32303d4a55d4b8471443fe6687a4565f51a0f3b5bbd84c2ff516602a6064f2287161ca09fe026d0f479c59
 Size (greylisting-spp-1.1.tar.gz) = 33254 bytes
 SHA1 (patch-src_Makefile) = f41880f39b144f1d46daa7c6fa5f30c07ecaf33a
+SHA1 (patch-src_commonstuff.h) = 51ce498f50711c2718ab2b7d9ba94414182904c4
+SHA1 (patch-src_greylisting-spp.c) = 30b23673bdb51bd7fcfeb371a6549eccf2bbd2e0
 SHA1 (patch-test_Makefile) = 82122675ed1ea2aa9ca33eec2403de88a97c551f
 SHA1 (patch-test_envdir.sh) = 31384dfd6d772dc97a6a870f4817ab1a4312100a
diff -r 81db8b7d2d36 -r 12c032161a8f mail/greylisting-spp/patches/patch-src_commonstuff.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/greylisting-spp/patches/patch-src_commonstuff.h      Fri Dec 14 07:19:39 2018 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_commonstuff.h,v 1.1 2018/12/14 07:19:39 schmonz Exp $
+
+Add DEBUGTUPLE and VERBOSETUPLE macros.
+
+--- src/commonstuff.h.orig     2011-06-18 19:58:29.000000000 +0000
++++ src/commonstuff.h
+@@ -28,6 +28,20 @@
+ 
+ extern char *progname, *debug, *verbose;
+ 
++#define DEBUGTUPLE(m1,m2,m3,m4)       \
++    if (debug) { \
++      write_error_string(progname); \
++      write_error_string(": "); \
++      write_error_string(m1); \
++      write_error_string(" ("); \
++      write_error_string(m2); \
++      write_error_string(","); \
++      write_error_string(m3); \
++      write_error_string(","); \
++      write_error_string(m4); \
++      write_error_string(")\n"); \
++    }
++
+ #define DEBUG4(m1,m2,m3,m4)   \
+     if (debug) { \
+       write_error_string(progname); \
+@@ -43,6 +57,20 @@ extern char *progname, *debug, *verbose;
+ #define DEBUG2(m1,m2)         DEBUG4(m1,m2,NULL,NULL)
+ #define DEBUG3(m1,m2,m3)      DEBUG4(m1,m2,m3,NULL)
+ 
++#define VERBOSETUPLE(m1,m2,m3,m4)     \
++    if (verbose) { \
++      write_error_string(progname); \
++      write_error_string(": "); \
++      write_error_string(m1); \
++      write_error_string(" ("); \
++      write_error_string(m2); \
++      write_error_string(","); \
++      write_error_string(m3); \
++      write_error_string(","); \
++      write_error_string(m4); \
++      write_error_string(")\n"); \
++    }
++
+ #define VERBOSE4(m1,m2,m3,m4) \
+     if (verbose) { \
+       write_error_string(progname); \
diff -r 81db8b7d2d36 -r 12c032161a8f mail/greylisting-spp/patches/patch-src_greylisting-spp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/greylisting-spp/patches/patch-src_greylisting-spp.c  Fri Dec 14 07:19:39 2018 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_greylisting-spp.c,v 1.1 2018/12/14 07:19:39 schmonz Exp $
+
+Log tuples if VERBOSE/DEBUG.
+
+--- src/greylisting-spp.c.orig 2011-06-18 19:58:00.000000000 +0000
++++ src/greylisting-spp.c
+@@ -144,18 +144,18 @@ int found, i;
+                      recipient);
+     if (found < 0) {
+       /* No match found -> reject and add entry */
+-      VERBOSE("Rejecting new triple")
++      VERBOSETUPLE("Rejecting new triple", remoteip, sender, recipient)
+       reject(sender);
+       add_entry(remoteip, ezmlm_sender == NULL ? sender : ezmlm_sender,
+                 recipient);
+     } else if (found == 0) {
+       /* Match found, but min_reject is not expired -> reject again */
+-      VERBOSE("Rejecting young triple")
++      VERBOSETUPLE("Rejecting young triple", remoteip, sender, recipient)
+       reject(sender);
+     } else {
+       /* Match found and min_reject expired and max_wait or accept_good not
+        * expired */
+-      DEBUG("Accepting known triple")
++      DEBUGTUPLE("Accepting known triple", remoteip, sender, recipient)
+       if (!*sender) {
+           /* Empty sender (bounce message) -> delete entry */
+           delete_entry();



Home | Main Index | Thread Index | Old Index