summaryrefslogtreecommitdiff
path: root/mail/dspam/patches/patch-ag
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 /mail/dspam/patches/patch-ag
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++
Diffstat (limited to 'mail/dspam/patches/patch-ag')
-rw-r--r--mail/dspam/patches/patch-ag23
1 files changed, 23 insertions, 0 deletions
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);
+