summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2009-03-16 18:13:34 +0000
committeradrianp <adrianp@pkgsrc.org>2009-03-16 18:13:34 +0000
commit9f0225a0d0b4e0b9ce1bf3f3128ac71bc77e66c0 (patch)
tree97021c32a52cb0ef66ab771fa5a85cbff3386283
parent1f3e66ede2ab137d899787c0462713e9c239b5fc (diff)
downloadpkgsrc-9f0225a0d0b4e0b9ce1bf3f3128ac71bc77e66c0.tar.gz
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++
-rw-r--r--mail/dspam/Makefile6
-rw-r--r--mail/dspam/distinfo4
-rw-r--r--mail/dspam/patches/patch-af21
-rw-r--r--mail/dspam/patches/patch-ag23
4 files changed, 51 insertions, 3 deletions
diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile
index 2845fde3fa3..dfbd5c0c88f 100644
--- a/mail/dspam/Makefile
+++ b/mail/dspam/Makefile
@@ -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_LOGFILE
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 --git a/mail/dspam/distinfo b/mail/dspam/distinfo
index 6223733bea0..6bf7e40e70c 100644
--- a/mail/dspam/distinfo
+++ b/mail/dspam/distinfo
@@ -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 @@ Size (dspam-3.8.0.tar.gz) = 726160 bytes
SHA1 (patch-aa) = 04e94e3da9de06c15863425d0a827858b5dd4a6c
SHA1 (patch-ad) = cfa68c01cb3f5ce0556c7a3b008dc214bdfbbd95
SHA1 (patch-ae) = 21f450dd67dc2101b44f1a952632b933a3c8a913
+SHA1 (patch-af) = 31c86b3f0cb7d7856e46207bee656472fcd093e0
+SHA1 (patch-ag) = d4b1cf206f8113a1150687e2942bd69f0b9767ee
diff --git a/mail/dspam/patches/patch-af b/mail/dspam/patches/patch-af
new file mode 100644
index 00000000000..17d2f9b1d57
--- /dev/null
+++ b/mail/dspam/patches/patch-af
@@ -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 --git a/mail/dspam/patches/patch-ag b/mail/dspam/patches/patch-ag
new file mode 100644
index 00000000000..e4f88d55773
--- /dev/null
+++ b/mail/dspam/patches/patch-ag
@@ -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);
+