take maintainership, ok jakob@
update to 3.6.4 (see http://dspam.nuclearelephant.com/text/RELEASE-3.6.4.txt for details) Additionally: - fix a typo in a printf - give postgresql a chance of decent performance - timeout at 15min not 5min per message by default
This commit is contained in:
parent
a4a3f3ef73
commit
5220cb1363
@ -1,10 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2006/02/15 05:58:19 david Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2006/03/23 17:17:40 todd Exp $
|
||||
|
||||
COMMENT= "anti-spam filter"
|
||||
|
||||
VERSION= 3.6.3
|
||||
VERSION= 3.6.4
|
||||
DISTNAME= dspam-${VERSION}
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
SHARED_LIBS= dspam 7.0
|
||||
MODGNU_SHARED_LIBS= dspam ''
|
||||
LIBdspam_ALIAS= realdspam
|
||||
@ -14,7 +13,7 @@ MASTER_SITES= http://dspam.nuclearelephant.com/sources/
|
||||
|
||||
HOMEPAGE= http://dspam.nuclearelephant.com/
|
||||
|
||||
MAINTAINER= Jakob Schlyter <jakob@openbsd.org>
|
||||
MAINTAINER= Todd T. Fries <todd@OpenBSD.org>
|
||||
|
||||
# GPL
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
@ -1,4 +1,4 @@
|
||||
SIZE (dspam-3.6.3.tar.gz) = 740097
|
||||
MD5 (dspam-3.6.3.tar.gz) = db1aedb9677e6bf5c7a47a72d4f130e5
|
||||
SHA1 (dspam-3.6.3.tar.gz) = 37d0a0b1caddd085483712286505aa4016dde008
|
||||
RMD160 (dspam-3.6.3.tar.gz) = e70719cb9524b9aa7c786b4e6fddeed6516a9f2a
|
||||
MD5 (dspam-3.6.4.tar.gz) = e9fdb00a23a99e05c9e4c22aa8aa3655
|
||||
RMD160 (dspam-3.6.4.tar.gz) = fcd431205e3fd737cfdfb90b695ba7c84bbb27d5
|
||||
SHA1 (dspam-3.6.4.tar.gz) = bc11d8c1584175de9cdeed7ed20e11c2a49bf53a
|
||||
SIZE (dspam-3.6.4.tar.gz) = 743664
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_base64_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/base64.c.orig Sat Sep 24 19:49:48 2005
|
||||
+++ src/base64.c Mon Oct 17 14:48:42 2005
|
||||
@@ -199,7 +199,7 @@ base64encode (const char *buf)
|
||||
$OpenBSD: patch-src_base64_c,v 1.2 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/base64.c.orig Sat Jan 21 19:59:14 2006
|
||||
+++ src/base64.c Sat Mar 4 19:04:43 2006
|
||||
@@ -201,7 +201,7 @@ base64encode (const char *buf)
|
||||
}
|
||||
|
||||
if (out[strlen (out) - 1] != '\n')
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_client_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/client.c.orig Sat Sep 24 19:49:48 2005
|
||||
+++ src/client.c Mon Oct 17 14:48:42 2005
|
||||
$OpenBSD: patch-src_client_c,v 1.2 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/client.c.orig Tue Jan 31 14:25:46 2006
|
||||
+++ src/client.c Mon Mar 6 17:08:36 2006
|
||||
@@ -108,7 +108,7 @@ int client_process(AGENT_CTX *ATX, buffe
|
||||
|
||||
/* RCPT TO - Send recipient information */
|
||||
@ -10,7 +10,34 @@ $OpenBSD: patch-src_client_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
node_nt = c_nt_first(ATX->users, &c_nt);
|
||||
while(node_nt != NULL) {
|
||||
const char *ptr = (const char *) node_nt->ptr;
|
||||
@@ -308,7 +308,7 @@ int client_connect(AGENT_CTX *ATX, int f
|
||||
@@ -165,7 +165,7 @@ int client_process(AGENT_CTX *ATX, buffe
|
||||
char *line = NULL;
|
||||
int head = !(ATX->flags & DAF_STDOUT);
|
||||
|
||||
- line = client_getline(&TTX, 300);
|
||||
+ line = client_getline(&TTX, 900);
|
||||
|
||||
while(line != NULL && strcmp(line, ".")) {
|
||||
chomp(line);
|
||||
@@ -185,7 +185,7 @@ int client_process(AGENT_CTX *ATX, buffe
|
||||
printf("%s\n", line);
|
||||
}
|
||||
free(line);
|
||||
- line = client_getline(&TTX, 300);
|
||||
+ line = client_getline(&TTX, 900);
|
||||
if (line) chomp(line);
|
||||
}
|
||||
free(line);
|
||||
@@ -193,7 +193,7 @@ int client_process(AGENT_CTX *ATX, buffe
|
||||
goto BAIL;
|
||||
} else {
|
||||
for(i=0;i<ATX->users->items;i++) {
|
||||
- char *input = client_getline(&TTX, 300);
|
||||
+ char *input = client_getline(&TTX, 900);
|
||||
char *x;
|
||||
int code = 500;
|
||||
|
||||
@@ -306,7 +306,7 @@ int client_connect(AGENT_CTX *ATX, int f
|
||||
if (domain) {
|
||||
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
saun.sun_family = AF_UNIX;
|
||||
@ -19,3 +46,37 @@ $OpenBSD: patch-src_client_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
addr_len = sizeof(saun.sun_family) + strlen(saun.sun_path) + 1;
|
||||
|
||||
LOGDEBUG(INFO_CLIENT_CONNECTING, host, 0);
|
||||
@@ -436,7 +436,7 @@ char * client_expect(THREAD_CTX *TTX, in
|
||||
char *inp, *dup, *ptr, *ptrptr;
|
||||
int recv_code;
|
||||
|
||||
- inp = client_getline(TTX, 300);
|
||||
+ inp = client_getline(TTX, 900);
|
||||
while(inp != NULL) {
|
||||
recv_code = 0;
|
||||
dup = strdup(inp);
|
||||
@@ -460,7 +460,7 @@ char * client_expect(THREAD_CTX *TTX, in
|
||||
|
||||
strlcpy(err, inp, len);
|
||||
free(inp);
|
||||
- inp = client_getline(TTX, 300);
|
||||
+ inp = client_getline(TTX, 900);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -505,13 +505,13 @@ int client_getcode(THREAD_CTX *TTX, char
|
||||
char *inp, *ptr, *ptrptr;
|
||||
int i;
|
||||
|
||||
- inp = client_getline(TTX, 300);
|
||||
+ inp = client_getline(TTX, 900);
|
||||
if (!inp)
|
||||
return EFAILURE;
|
||||
|
||||
while(inp && !strncmp(inp, "250-", 4)) {
|
||||
free(inp);
|
||||
- inp = client_getline(TTX, 300);
|
||||
+ inp = client_getline(TTX, 900);
|
||||
}
|
||||
|
||||
strlcpy(err, inp, len);
|
||||
|
48
mail/dspam/patches/patch-src_daemon_c
Normal file
48
mail/dspam/patches/patch-src_daemon_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-src_daemon_c,v 1.3 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/daemon.c.orig Mon Mar 6 17:23:43 2006
|
||||
+++ src/daemon.c Mon Mar 6 17:24:26 2006
|
||||
@@ -549,7 +549,7 @@ void *process_connection(void *ptr) {
|
||||
|
||||
while(ATX->users->items == 0 || invalid) {
|
||||
free(cmdline);
|
||||
- cmdline = daemon_getline(TTX, 300);
|
||||
+ cmdline = daemon_getline(TTX, 900);
|
||||
|
||||
while(cmdline &&
|
||||
(!strncasecmp(cmdline, "RCPT TO:", 8) ||
|
||||
@@ -596,7 +596,7 @@ void *process_connection(void *ptr) {
|
||||
|
||||
GETCMD:
|
||||
free(cmdline);
|
||||
- cmdline = daemon_getline(TTX, 300);
|
||||
+ cmdline = daemon_getline(TTX, 900);
|
||||
}
|
||||
|
||||
if (cmdline == NULL)
|
||||
@@ -873,7 +873,7 @@ buffer * read_sock(THREAD_CTX *TTX, AGEN
|
||||
body = 1;
|
||||
}
|
||||
|
||||
- while ((buf = daemon_getline(TTX, 300))!=NULL) {
|
||||
+ while ((buf = daemon_getline(TTX, 900))!=NULL) {
|
||||
chomp(buf);
|
||||
|
||||
if (!strcmp(buf, ".")) {
|
||||
@@ -956,7 +956,7 @@ char *daemon_expect(THREAD_CTX *TTX, con
|
||||
char buf[128];
|
||||
char *cmd;
|
||||
|
||||
- cmd = daemon_getline(TTX, 300);
|
||||
+ cmd = daemon_getline(TTX, 900);
|
||||
if (cmd == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -979,7 +979,7 @@ char *daemon_expect(THREAD_CTX *TTX, con
|
||||
if (send_socket(TTX, buf)<=0)
|
||||
return NULL;
|
||||
free(cmd);
|
||||
- cmd = daemon_getline(TTX, 300);
|
||||
+ cmd = daemon_getline(TTX, 900);
|
||||
if (cmd == NULL)
|
||||
return NULL;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_dspam_c,v 1.3 2006/01/22 04:10:43 brad Exp $
|
||||
--- src/dspam.c.orig Wed Jan 18 11:48:53 2006
|
||||
+++ src/dspam.c Sat Jan 21 22:54:41 2006
|
||||
$OpenBSD: patch-src_dspam_c,v 1.4 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/dspam.c.orig Tue Jan 31 14:25:46 2006
|
||||
+++ src/dspam.c Sat Mar 4 19:04:44 2006
|
||||
@@ -382,7 +382,7 @@ process_message (
|
||||
CTX->confidence = 1.0;
|
||||
STATUS("A virus was detected in the message contents");
|
||||
@ -28,7 +28,7 @@ $OpenBSD: patch-src_dspam_c,v 1.3 2006/01/22 04:10:43 brad Exp $
|
||||
internally_canned = 1;
|
||||
}
|
||||
}
|
||||
@@ -762,10 +762,10 @@ process_message (
|
||||
@@ -743,10 +743,10 @@ process_message (
|
||||
|
||||
switch (CTX->result) {
|
||||
case DSR_ISSPAM:
|
||||
@ -41,7 +41,7 @@ $OpenBSD: patch-src_dspam_c,v 1.3 2006/01/22 04:10:43 brad Exp $
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1030,7 +1030,7 @@ int tag_message(AGENT_CTX *ATX, ds_messa
|
||||
@@ -1011,7 +1011,7 @@ int tag_message(AGENT_CTX *ATX, ds_messa
|
||||
int tagged = 0;
|
||||
char spam_subject[16];
|
||||
|
||||
@ -50,7 +50,7 @@ $OpenBSD: patch-src_dspam_c,v 1.3 2006/01/22 04:10:43 brad Exp $
|
||||
if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' &&
|
||||
_ds_pref_val(ATX->PTX, "spamSubject")[0] != 0)
|
||||
{
|
||||
@@ -1595,7 +1595,7 @@ int process_users(AGENT_CTX *ATX, buffer
|
||||
@@ -1585,7 +1585,7 @@ int process_users(AGENT_CTX *ATX, buffer
|
||||
if (parse_message == NULL) {
|
||||
LOG(LOG_CRIT, ERR_MEM_ALLOC);
|
||||
presult->exitcode = ERC_PROCESS;
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_mysql_drv_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- src/mysql_drv.c.orig Sat Oct 1 17:33:44 2005
|
||||
+++ src/mysql_drv.c Mon Oct 17 14:48:42 2005
|
||||
@@ -1350,7 +1350,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
|
||||
$OpenBSD: patch-src_mysql_drv_c,v 1.2 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/mysql_drv.c.orig Thu Feb 2 11:15:36 2006
|
||||
+++ src/mysql_drv.c Sat Mar 4 19:04:44 2006
|
||||
@@ -1353,7 +1353,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
|
||||
virtual_username,
|
||||
virtual_table);
|
||||
#else
|
||||
|
@ -1,7 +1,16 @@
|
||||
$OpenBSD: patch-src_pgsql_drv_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- src/pgsql_drv.c.orig Mon Oct 10 15:52:21 2005
|
||||
+++ src/pgsql_drv.c Mon Oct 17 14:48:42 2005
|
||||
@@ -1390,7 +1390,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
|
||||
$OpenBSD: patch-src_pgsql_drv_c,v 1.2 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/pgsql_drv.c.orig Thu Feb 2 11:15:36 2006
|
||||
+++ src/pgsql_drv.c Sat Mar 4 19:08:13 2006
|
||||
@@ -1133,7 +1133,7 @@ _ds_get_signature (DSPAM_CTX * CTX, stru
|
||||
|
||||
p = _pgsql_drv_getpwuid (CTX, uid);
|
||||
if (!p) {
|
||||
- LOG(LOG_CRIT, "_ds_get_signature(): _mysql_drv_getpwuid(%d) failed: aborting", uid);
|
||||
+ LOG(LOG_CRIT, "_ds_get_signature(): _pgsql_drv_getpwuid(%d) failed: aborting", uid);
|
||||
return EFAILURE;
|
||||
}
|
||||
username = strdup(p->pw_name);
|
||||
@@ -1392,7 +1392,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
|
||||
virtual_username,
|
||||
virtual_table);
|
||||
#else
|
||||
|
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-src_tools_pgsql_drv_pgsql_objects_sql,v 1.1 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/tools.pgsql_drv/pgsql_objects.sql.orig Tue Jan 24 09:46:14 2006
|
||||
+++ src/tools.pgsql_drv/pgsql_objects.sql Mon Mar 20 17:28:38 2006
|
||||
@@ -55,3 +55,16 @@ begin
|
||||
return;
|
||||
end;';
|
||||
|
||||
+--
|
||||
+-- For much better performance
|
||||
+-- see http://archives.postgresql.org/pgsql-performance/2004-11/msg00416.php
|
||||
+-- and http://archives.postgresql.org/pgsql-performance/2004-11/msg00417.php
|
||||
+-- for details
|
||||
+--
|
||||
+
|
||||
+alter table "dspam_token_data" alter "token" set statistics 200;
|
||||
+alter table dspam_signature_data alter signature set statistics 200;
|
||||
+alter table dspam_token_data alter innocent_hits set statistics 200;
|
||||
+alter table dspam_token_data alter spam_hits set statistics 200;
|
||||
+CREATE INDEX id_token_data_sumhits ON dspam_token_data ((spam_hits + innocent_hits));
|
||||
+analyze;
|
29
mail/dspam/patches/patch-src_tools_pgsql_drv_purge_sql
Normal file
29
mail/dspam/patches/patch-src_tools_pgsql_drv_purge_sql
Normal file
@ -0,0 +1,29 @@
|
||||
$OpenBSD: patch-src_tools_pgsql_drv_purge_sql,v 1.1 2006/03/23 17:17:40 todd Exp $
|
||||
--- src/tools.pgsql_drv/purge.sql.orig Sun Jan 22 17:02:03 2006
|
||||
+++ src/tools.pgsql_drv/purge.sql Sun Jan 22 17:02:06 2006
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
DELETE FROM dspam_token_data
|
||||
WHERE (innocent_hits*2) + spam_hits < 5
|
||||
- AND CURRENT_DATE - last_hit > 60;
|
||||
+ AND last_hit < CURRENT_DATE - 60;
|
||||
|
||||
DELETE FROM dspam_token_data
|
||||
WHERE innocent_hits = 1 AND spam_hits = 0
|
||||
- AND CURRENT_DATE - last_hit > 15;
|
||||
+ AND last_hit < CURRENT_DATE - 15;
|
||||
|
||||
DELETE FROM dspam_token_data
|
||||
WHERE innocent_hits = 0 AND spam_hits = 1
|
||||
- AND CURRENT_DATE - last_hit > 15;
|
||||
+ AND last_hit < CURRENT_DATE - 15;
|
||||
|
||||
DELETE FROM dspam_token_data
|
||||
- WHERE CURRENT_DATE - last_hit > 90;
|
||||
+ WHERE last_hit < CURRENT_DATE - 90;
|
||||
|
||||
DELETE FROM dspam_signature_data
|
||||
- WHERE CURRENT_DATE - created_on > 14;
|
||||
+ WHERE created_on < CURRENT_DATE - 14;
|
||||
|
||||
VACUUM ANALYSE;
|
Loading…
Reference in New Issue
Block a user