Package: dspam
Version: 3.10.2+dfsg-12
Severity: important
Tags: patch
--- Please enter the report below this line. ---
Hi,
I'm using dspam as a content_filter in postfix, and discovered that
using "--rcpt-to ${recipient}" doesn't work as expected.
Indeed, the dspam client send the user in RCPT-TO while discussing to
the server.
Here is the patch that make it work "like in the man": use rcpt-to if
available, else use the user.
Maybe it should be send upstream…
Thanks for integration and comments,
Adrien
--- System information. ---
Architecture: i386
Kernel: Linux 3.11-2-686-pae
Debian Release: jessie/sid
500 unstable ftp.fr.debian.org
1 experimental ftp.fr.debian.org
--- Package information. ---
Depends (Version) | Installed
============================================-+-===================
libc6 (>= 2.4) | 2.17-97
libdspam7 (>= 3.9.0) |
libpq5 | 9.3.1-1
perl | 5.18.1-4
lsb-base (>= 3.0-6) | 4.1+Debian12
libdspam7-drv-hash (= 3.10.2+dfsg-7) |
OR libdspam7-drv-mysql (= 3.10.2+dfsg-7) |
OR libdspam7-drv-pgsql (= 3.10.2+dfsg-7) |
OR libdspam7-drv-sqlite3 (= 3.10.2+dfsg-7) |
Recommends (Version) | Installed
===============================-+-===========
procmail |
OR maildrop |
OR courier-maildrop |
OR sensible-mda |
dspam-doc |
Suggests (Version) | Installed
================================-+-===========
clamav-daemon |
dspam-webfrontend |
Index: dspam-3.10.2+dfsg/src/client.c
===================================================================
--- dspam-3.10.2+dfsg.orig/src/client.c 2013-11-30 20:52:48.000000000 +0100
+++ dspam-3.10.2+dfsg/src/client.c 2013-11-30 20:55:05.850021441 +0100
@@ -109,7 +109,10 @@
/* RCPT TO - Send recipient information */
strcpy(buf, "RCPT TO: ");
- node_nt = c_nt_first(ATX->users, &c_nt);
+ if (ATX->recipients)
+ node_nt = c_nt_first(ATX->recipients, &c_nt);
+ else
+ node_nt = c_nt_first(ATX->users, &c_nt);
while(node_nt != NULL) {
const char *ptr = (const char *) node_nt->ptr;
snprintf(buf, sizeof(buf), "RCPT TO: <%s>", ptr);
@@ -123,7 +126,10 @@
goto QUIT;
}
- node_nt = c_nt_next(ATX->users, &c_nt);
+ if (ATX->recipients)
+ node_nt = c_nt_next(ATX->recipients, &c_nt);
+ else
+ node_nt = c_nt_next(ATX->users, &c_nt);
}
/* DATA - Send message */