pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/dspam Add two new patches to DSPAM:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/32735fb5262c
branches:  trunk
changeset: 556079:32735fb5262c
user:      adrianp <adrianp%pkgsrc.org@localhost>
date:      Mon Mar 16 18:13:34 2009 +0000

description:
Add two new patches to DSPAM:

1) Fix a bug when using SMTP/LMTP which can cause the mbox to be written
with trailing ^M's which causes the www interface to stop working.

2) Add a custom configuration option in dspam.conf of "StripRcptDomain" which,
if selected, strips the RCPT TO domain from email processed through DSPAM.
This is off by default.

PKGREVISION++

diffstat:

 mail/dspam/Makefile         |   6 ++++--
 mail/dspam/distinfo         |   4 +++-
 mail/dspam/patches/patch-af |  21 +++++++++++++++++++++
 mail/dspam/patches/patch-ag |  23 +++++++++++++++++++++++
 4 files changed, 51 insertions(+), 3 deletions(-)

diffs (89 lines):

diff -r 4824e2664b50 -r 32735fb5262c mail/dspam/Makefile
--- a/mail/dspam/Makefile       Mon Mar 16 18:11:39 2009 +0000
+++ b/mail/dspam/Makefile       Mon Mar 16 18:13:34 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.59 2009/03/13 10:11:14 roy Exp $
+# $NetBSD: Makefile,v 1.60 2009/03/16 18:13:34 adrianp Exp $
 
 DISTNAME=      dspam-3.8.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    mail
 MASTER_SITES=  http://dspam.nuclearelephant.com/sources/
 
@@ -41,6 +41,8 @@
 BUILD_DEFS+=           DSPAM_DOMAIN
 BUILD_DEFS+=           DSPAM_WWWHOME
 BUILD_DEFS+=           DSPAM_PIDDIR
+BUILD_DEFS+=           APACHE_USER
+BUILD_DEFS+=           APACHE_GROUP
 
 .include "../../mk/bsd.prefs.mk"
 
diff -r 4824e2664b50 -r 32735fb5262c mail/dspam/distinfo
--- a/mail/dspam/distinfo       Mon Mar 16 18:11:39 2009 +0000
+++ b/mail/dspam/distinfo       Mon Mar 16 18:13:34 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2009/03/13 10:11:14 roy Exp $
+$NetBSD: distinfo,v 1.32 2009/03/16 18:13:34 adrianp Exp $
 
 SHA1 (dspam-3.8.0.tar.gz) = d1de7ee2134522adaf52f49167accecf1589fa96
 RMD160 (dspam-3.8.0.tar.gz) = e7831e2415e30e819dd9cbc0ba3f269e113e2fb9
@@ -6,3 +6,5 @@
 SHA1 (patch-aa) = 04e94e3da9de06c15863425d0a827858b5dd4a6c
 SHA1 (patch-ad) = cfa68c01cb3f5ce0556c7a3b008dc214bdfbbd95
 SHA1 (patch-ae) = 21f450dd67dc2101b44f1a952632b933a3c8a913
+SHA1 (patch-af) = 31c86b3f0cb7d7856e46207bee656472fcd093e0
+SHA1 (patch-ag) = d4b1cf206f8113a1150687e2942bd69f0b9767ee
diff -r 4824e2664b50 -r 32735fb5262c mail/dspam/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dspam/patches/patch-af       Mon Mar 16 18:13:34 2009 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-af,v 1.1 2009/03/16 18:13:34 adrianp Exp $
+
+Fix a bug when using SMTP/LMTP which can cause the mbox to be written
+with trailing ^M's which causes the www interface to stop working.
+
+--- src/dspam.c.orig   2006-12-12 15:33:45.000000000 +0000
++++ src/dspam.c
+@@ -762,7 +762,12 @@ process_message (
+ 
+   /* Reassemble message from components */
+ 
+-  copyback = _ds_assemble_message (CTX->message, (USE_LMTP || USE_SMTP) ? "\r\n" : "\n");
++  if (CTX->result == DSR_ISSPAM && (!(ATX->flags & DAF_DELIVER_SPAM))) {
++      copyback = _ds_assemble_message (CTX->message, "\n");
++  } else {
++      copyback = _ds_assemble_message (CTX->message,
++            (USE_LMTP || USE_SMTP) ? "\r\n" : "\n");
++  }
+   buffer_clear (message);
+   buffer_cat (message, copyback);
+   free (copyback);
diff -r 4824e2664b50 -r 32735fb5262c mail/dspam/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dspam/patches/patch-ag       Mon Mar 16 18:13:34 2009 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-ag,v 1.1 2009/03/16 18:13:34 adrianp Exp $
+
+Add a custom configuration option in dspam.conf of "StripRcptDomain" which,
+if selected, strips the RCPT TO domain from email processed through DSPAM.
+
+--- src/daemon.c.orig  2006-08-03 18:27:00.000000000 +0100
++++ src/daemon.c       2006-08-03 19:29:22.000000000 +0100
+@@ -571,6 +571,15 @@
+           goto GETCMD;
+         }
+ 
++      /* Chop of @.* from the recipient */
++      if (_ds_match_attribute(agent_config, "StripRcptDomain", "on")) {
++        strtok(username, "@");
++        if (username[0] == 0 || username[0] == '-') { 
++          daemon_reply(TTX, LMTP_BAD_CMD, "5.1.2", ERR_LMTP_BAD_RCPT);
++          goto GETCMD;
++        }
++      }
++
+         if (_ds_match_attribute(agent_config, "Broken", "case"))
+           lc(username, username);
+ 



Home | Main Index | Thread Index | Old Index