update to v3.6.1; contributed by Frank Denis
This commit is contained in:
parent
77a5dc63c9
commit
db3ae76c17
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2005/10/26 06:18:38 jakob Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2005/11/23 08:52:48 jakob Exp $
|
||||
|
||||
COMMENT= "anti-spam filter"
|
||||
|
||||
VERSION= 3.6.0
|
||||
VERSION= 3.6.1
|
||||
DISTNAME= dspam-${VERSION}
|
||||
CATEGORIES= mail
|
||||
|
||||
@ -40,7 +40,7 @@ DOCS= ${WRKSRC}/README ${WRKSRC}/UPGRADING ${WRKSRC}/RELEASE.NOTES \
|
||||
EXAMPLESDIR= ${PREFIX}/share/examples/dspam
|
||||
DRIVER=
|
||||
|
||||
FLAVORS= sqlite3 sqlite mysql pgsql hash daemon clamav ldap
|
||||
FLAVORS= sqlite3 sqlite mysql pgsql hash clamav ldap
|
||||
FLAVOR?= sqlite3
|
||||
|
||||
.if ${FLAVOR:L:Mmysql}
|
||||
@ -83,7 +83,7 @@ BROKEN= choose either mysql or pgsql or sqlite or sqlite3 or hash
|
||||
CONFIGURE_ARGS+= --with-storage-driver=sqlite_drv \
|
||||
--with-sqlite-includes=${LOCALBASE}/include \
|
||||
--with-sqlite-libraries=${LOCALBASE}/lib
|
||||
LIB_DEPENDS= sqlite::databases/sqlite
|
||||
LIB_DEPENDS+= sqlite.8::databases/sqlite
|
||||
DRIVER= sqlite
|
||||
.endif
|
||||
|
||||
@ -96,29 +96,23 @@ FLAVOR+= sqlite3
|
||||
CONFIGURE_ARGS+= --with-storage-driver=sqlite3_drv \
|
||||
--with-sqlite-includes=${LOCALBASE}/include \
|
||||
--with-sqlite-libraries=${LOCALBASE}/lib
|
||||
LIB_DEPENDS= sqlite3::databases/sqlite3
|
||||
LIB_DEPENDS+= sqlite3.8::databases/sqlite3
|
||||
DRIVER= sqlite
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Mclamav}
|
||||
CONFIGURE_ARGS+= --enable-clamav
|
||||
LIB_DEPENDS= clamav.1::security/clamav
|
||||
LIB_DEPENDS+= clamav.1::security/clamav
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Mldap}
|
||||
CONFIGURE_ARGS+= --enable-ldap
|
||||
LIB_DEPENDS= ldap_r.7,lber.7::databases/openldap
|
||||
LIB_DEPENDS+= ldap_r.8,lber.8::databases/openldap
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${DEPBASE}/include" \
|
||||
LDFLAGS="-L${DEPBASE}/lib"
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Mdaemon}
|
||||
.if ${FLAVOR:L:Msqlite3}
|
||||
BROKEN= daemon mode is currently incompatible with sqlite3
|
||||
.endif
|
||||
.if ${FLAVOR:L:Msqlite}
|
||||
BROKEN= daemon mode is currently incompatible with sqlite
|
||||
.endif
|
||||
.if empty(FLAVOR:L:Msqlite3) && empty(FLAVOR:L:Msqlite)
|
||||
CONFIGURE_ARGS+= --enable-daemon
|
||||
.endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
MD5 (dspam-3.6.0.tar.gz) = d9ee63a8cf67ea933d711b00851ce916
|
||||
RMD160 (dspam-3.6.0.tar.gz) = eb4b7ff0f260a12508b47d5141a9bf1a0cf49326
|
||||
SHA1 (dspam-3.6.0.tar.gz) = 19c0064902544bde90d0302b5d657782a4f2cc8f
|
||||
SIZE (dspam-3.6.0.tar.gz) = 732042
|
||||
MD5 (dspam-3.6.1.tar.gz) = 6aad568823f297852dff4989da332e22
|
||||
SHA1 (dspam-3.6.1.tar.gz) = 864cd85d44350c6b4d203cde40d025cf5015af82
|
||||
RMD160 (dspam-3.6.1.tar.gz) = d93f73ad87ea0061e3b2c3d4dc84578872bce74d
|
||||
SIZE (dspam-3.6.1.tar.gz) = 739389
|
||||
|
16
mail/dspam/patches/patch-UPGRADING
Normal file
16
mail/dspam/patches/patch-UPGRADING
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-UPGRADING,v 1.1 2005/11/23 08:52:49 jakob Exp $
|
||||
--- UPGRADING.orig Tue Oct 25 14:32:09 2005
|
||||
+++ UPGRADING Tue Nov 8 23:44:49 2005
|
||||
@@ -8,8 +8,10 @@ UPGRADING FROM < 3.6.1
|
||||
|
||||
- For users of hash_drv: A cssconvert tool has been provided to convert all
|
||||
v3.6.0 databases to the correct, 8-byte aligned format used in all newer
|
||||
- versions. Please run cssconvert on all of your .css databases before
|
||||
- turning on your new version of dspam.
|
||||
+ versions.
|
||||
+
|
||||
+ The OpenBSD port of DSPAM 3.6.0 already used the correctly aligned format,
|
||||
+ so that you don't need to run cssconvert before upgrading to 3.6.1 and later.
|
||||
|
||||
UPGRADING FROM < 3.6.0
|
||||
----------------------
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- configure.orig Mon Oct 17 02:50:02 2005
|
||||
+++ configure Tue Oct 18 18:02:03 2005
|
||||
@@ -20031,7 +20031,7 @@ fi
|
||||
done
|
||||
|
||||
|
||||
-for ac_func in strsep
|
||||
+for ac_func in strsep strcasestr
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-src_agent_shared_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/agent_shared.c.orig Tue Oct 25 22:46:43 2005
|
||||
+++ src/agent_shared.c Tue Oct 25 22:47:02 2005
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* $Id: patch-src_agent_shared_c,v 1.1 2005/10/26 06:18:38 jakob Exp $ */
|
||||
+/* $Id: patch-src_agent_shared_c,v 1.1 2005/10/26 06:18:38 jakob Exp $ */
|
||||
|
||||
/*
|
||||
DSPAM
|
||||
@@ -718,7 +718,7 @@ buffer * read_stdin(AGENT_CTX *ATX) {
|
||||
}
|
||||
|
||||
if (_ds_match_attribute(agent_config, "DataSource", "document")) {
|
||||
- buffer_cat(msg, ".\n\n");
|
||||
+ buffer_cat(msg, ": \n\n");
|
||||
body = 1;
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
$OpenBSD: patch-src_auto-config_h_in,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/auto-config.h.in.orig Mon Oct 17 02:51:17 2005
|
||||
+++ src/auto-config.h.in Tue Oct 18 18:08:00 2005
|
||||
@@ -86,6 +86,9 @@
|
||||
/* Define to 1 if you have the `strsep' function. */
|
||||
#undef HAVE_STRSEP
|
||||
|
||||
+/* Define to 1 if you have the `strcasestr' function. */
|
||||
+#undef HAVE_STRCASESTR
|
||||
+
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_daemon_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/daemon.c.orig Tue Oct 25 22:46:43 2005
|
||||
+++ src/daemon.c Tue Oct 25 22:47:02 2005
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* $Id: patch-src_daemon_c,v 1.1 2005/10/26 06:18:38 jakob Exp $ */
|
||||
+/* $Id: patch-src_daemon_c,v 1.1 2005/10/26 06:18:38 jakob Exp $ */
|
||||
|
||||
/*
|
||||
DSPAM
|
||||
@@ -732,8 +732,9 @@ GETCMD:
|
||||
/* Send a terminating '.' if --stdout in 'dspam' mode */
|
||||
|
||||
if (ATX->sockfd_output) {
|
||||
- if (send_socket(TTX, ".")<=0)
|
||||
- goto CLOSE;
|
||||
+ if (!(ATX->flags & DAF_SUMMARY))
|
||||
+ if (send_socket(TTX, ".")<=0)
|
||||
+ goto CLOSE;
|
||||
|
||||
/* Otherwise, produce standard delivery results */
|
||||
|
@ -1,63 +0,0 @@
|
||||
$OpenBSD: patch-src_decode_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/decode.c.orig Thu Oct 13 16:28:13 2005
|
||||
+++ src/decode.c Tue Oct 25 22:47:02 2005
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* $Id: patch-src_decode_c,v 1.1 2005/10/26 06:18:38 jakob Exp $ */
|
||||
+/* $Id: patch-src_decode_c,v 1.1 2005/10/26 06:18:38 jakob Exp $ */
|
||||
|
||||
/*
|
||||
DSPAM
|
||||
@@ -528,11 +528,12 @@ _ds_analyze_header (
|
||||
|
||||
if (!strcasecmp (header->heading, "Content-Type"))
|
||||
{
|
||||
+ int len = strlen(header->data);
|
||||
if (!strncasecmp (header->data, "text", 4)) {
|
||||
block->media_type = MT_TEXT;
|
||||
- if (!strncasecmp (header->data + 5, "plain", 5))
|
||||
+ if (len >= 5 && !strncasecmp (header->data + 5, "plain", 5))
|
||||
block->media_subtype = MST_PLAIN;
|
||||
- else if (!strncasecmp (header->data + 5, "html", 4))
|
||||
+ else if (len >= 5 && !strncasecmp (header->data + 5, "html", 4))
|
||||
block->media_subtype = MST_HTML;
|
||||
else
|
||||
block->media_subtype = MST_OTHER;
|
||||
@@ -541,7 +542,7 @@ _ds_analyze_header (
|
||||
else if (!strncasecmp (header->data, "application", 11))
|
||||
{
|
||||
block->media_type = MT_APPLICATION;
|
||||
- if (!strncasecmp (header->data + 12, "dspam-signature", 15))
|
||||
+ if (len >= 12 && !strncasecmp (header->data + 12, "dspam-signature", 15))
|
||||
block->media_subtype = MST_DSPAM_SIGNATURE;
|
||||
else
|
||||
block->media_subtype = MST_OTHER;
|
||||
@@ -550,9 +551,9 @@ _ds_analyze_header (
|
||||
else if (!strncasecmp (header->data, "message", 7))
|
||||
{
|
||||
block->media_type = MT_MESSAGE;
|
||||
- if (!strncasecmp (header->data + 8, "rfc822", 6))
|
||||
+ if (len >= 8 && !strncasecmp (header->data + 8, "rfc822", 6))
|
||||
block->media_subtype = MST_RFC822;
|
||||
- else if (!strncasecmp (header->data + 8, "inoculation", 11))
|
||||
+ else if (len >= 8 && !strncasecmp (header->data + 8, "inoculation", 11))
|
||||
block->media_subtype = MST_INOCULATION;
|
||||
else
|
||||
block->media_subtype = MST_OTHER;
|
||||
@@ -563,13 +564,13 @@ _ds_analyze_header (
|
||||
char boundary[128];
|
||||
|
||||
block->media_type = MT_MULTIPART;
|
||||
- if (!strncasecmp (header->data + 10, "mixed", 5))
|
||||
+ if (len >= 10 && !strncasecmp (header->data + 10, "mixed", 5))
|
||||
block->media_subtype = MST_MIXED;
|
||||
- else if (!strncasecmp (header->data + 10, "alternative", 11))
|
||||
+ else if (len >= 10 && !strncasecmp (header->data + 10, "alternative", 11))
|
||||
block->media_subtype = MST_ALTERNATIVE;
|
||||
- else if (!strncasecmp (header->data + 10, "signed", 6))
|
||||
+ else if (len >= 10 && !strncasecmp (header->data + 10, "signed", 6))
|
||||
block->media_subtype = MST_SIGNED;
|
||||
- else if (!strncasecmp (header->data + 10, "encrypted", 9))
|
||||
+ else if (len >= 10 && !strncasecmp (header->data + 10, "encrypted", 9))
|
||||
block->media_subtype = MST_ENCRYPTED;
|
||||
else
|
||||
block->media_subtype = MST_OTHER;
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_dspam_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
--- src/dspam.c.orig Tue Oct 4 18:22:58 2005
|
||||
+++ src/dspam.c Mon Oct 17 14:48:42 2005
|
||||
$OpenBSD: patch-src_dspam_c,v 1.2 2005/11/23 08:52:49 jakob Exp $
|
||||
--- src/dspam.c.orig Tue Oct 25 14:32:09 2005
|
||||
+++ src/dspam.c Tue Nov 8 16:11:16 2005
|
||||
@@ -382,7 +382,7 @@ process_message (
|
||||
CTX->confidence = 1.0;
|
||||
STATUS("A virus was detected in the message contents");
|
||||
@ -50,7 +50,7 @@ $OpenBSD: patch-src_dspam_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
|
||||
if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' &&
|
||||
_ds_pref_val(ATX->PTX, "spamSubject")[0] != 0)
|
||||
{
|
||||
@@ -1572,7 +1572,7 @@ int process_users(AGENT_CTX *ATX, buffer
|
||||
@@ -1596,7 +1596,7 @@ int process_users(AGENT_CTX *ATX, buffer
|
||||
if (parse_message == NULL) {
|
||||
LOG(LOG_CRIT, ERR_MEM_ALLOC);
|
||||
presult->exitcode = ERC_PROCESS;
|
||||
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_hash_drv_h,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- src/hash_drv.h.orig Sat Oct 1 00:15:00 2005
|
||||
+++ src/hash_drv.h Tue Oct 25 22:47:02 2005
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* $Id: patch-src_hash_drv_h,v 1.1 2005/10/26 06:18:39 jakob Exp $ */
|
||||
+/* $Id: patch-src_hash_drv_h,v 1.1 2005/10/26 06:18:39 jakob Exp $ */
|
||||
|
||||
/*
|
||||
DSPAM
|
||||
@@ -39,6 +39,7 @@ typedef struct _hash_drv_header
|
||||
{
|
||||
unsigned long hash_rec_max;
|
||||
struct _ds_spam_totals totals;
|
||||
+ char padding[4]; /* Keep 8-byte alignment */
|
||||
} *hash_drv_header_t;
|
||||
|
||||
typedef struct _hash_drv_map
|
@ -1,46 +0,0 @@
|
||||
$OpenBSD: patch-src_libdspam_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- src/libdspam.c.orig Mon Oct 17 02:48:46 2005
|
||||
+++ src/libdspam.c Mon Oct 17 14:48:42 2005
|
||||
@@ -594,9 +594,9 @@ dspam_process (DSPAM_CTX * CTX, const ch
|
||||
|
||||
if (CTX->class[0] == 0) {
|
||||
if (CTX->result == DSR_ISSPAM)
|
||||
- strcpy(CTX->class, LANG_CLASS_SPAM);
|
||||
+ strlcpy(CTX->class, LANG_CLASS_SPAM, sizeof (CTX->class));
|
||||
else if (CTX->result == DSR_ISINNOCENT)
|
||||
- strcpy(CTX->class, LANG_CLASS_INNOCENT);
|
||||
+ strlcpy(CTX->class, LANG_CLASS_INNOCENT, sizeof (CTX->class));
|
||||
}
|
||||
|
||||
if (is_toe)
|
||||
@@ -768,9 +768,9 @@ _ds_operate (DSPAM_CTX * CTX, char *head
|
||||
goto bail;
|
||||
}
|
||||
|
||||
- strcpy(CTX->signature->data, headers);
|
||||
- strcat(CTX->signature->data, "\001");
|
||||
- strcat(CTX->signature->data, body);
|
||||
+ strlcpy(CTX->signature->data, headers, CTX->signature->length);
|
||||
+ strlcat(CTX->signature->data, "\001", CTX->signature->length);
|
||||
+ strlcat(CTX->signature->data, body, CTX->signature->length);
|
||||
}
|
||||
|
||||
if (!diction)
|
||||
@@ -962,7 +962,7 @@ _ds_operate (DSPAM_CTX * CTX, char *head
|
||||
if (CTX->flags & DSF_WHITELIST && do_whitelist) {
|
||||
LOGDEBUG("auto-whitelisting this message");
|
||||
CTX->result = DSR_ISINNOCENT;
|
||||
- strcpy(CTX->class, LANG_CLASS_WHITELISTED);
|
||||
+ strlcpy(CTX->class, LANG_CLASS_WHITELISTED, sizeof (CTX->class));
|
||||
}
|
||||
|
||||
/* Update Totals */
|
||||
@@ -2282,7 +2282,7 @@ int _ds_instantiate_bnr(
|
||||
previous_bnr_probs[i] = previous_bnr_probs[i+1];
|
||||
|
||||
previous_bnr_probs[BNR_SIZE-1] = _ds_round(ds_term->s.probability);
|
||||
- sprintf(bnr_token, "bnr.%c|", identifier);
|
||||
+ snprintf(bnr_token, sizeof (bnr_token), "bnr.%c|", identifier);
|
||||
for(i=0;i<BNR_SIZE;i++) {
|
||||
char x[6];
|
||||
snprintf(x, 6, "%01.2f_", previous_bnr_probs[i]);
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_util_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- src/util.c.orig Sat Oct 1 06:32:19 2005
|
||||
+++ src/util.c Mon Oct 17 14:48:42 2005
|
||||
$OpenBSD: patch-src_util_c,v 1.2 2005/11/23 08:52:49 jakob Exp $
|
||||
--- src/util.c.orig Wed Oct 26 19:39:32 2005
|
||||
+++ src/util.c Tue Nov 8 16:13:59 2005
|
||||
@@ -278,7 +278,7 @@ const char * _ds_userdir_path (char *pat
|
||||
#endif
|
||||
|
||||
@ -19,23 +19,7 @@ $OpenBSD: patch-src_util_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
#endif
|
||||
|
||||
/* Use home/opt-in/ and home/opt-out/ to store opt files, instead of
|
||||
@@ -675,6 +675,7 @@ float _ds_round(float n) {
|
||||
return (r/100.0);
|
||||
}
|
||||
|
||||
+#ifndef __HAVE_STRCASESTR__
|
||||
char *
|
||||
strcasestr(s, find)
|
||||
const char *s, *find;
|
||||
@@ -695,6 +696,7 @@ strcasestr(s, find)
|
||||
}
|
||||
return ((char *)s);
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifndef HAVE_INET_NTOA_R
|
||||
/*
|
||||
@@ -746,6 +748,7 @@ inet_ntoa_r(struct in_addr in, char *buf
|
||||
@@ -748,6 +748,7 @@ inet_ntoa_r(struct in_addr in, char *buf
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
$OpenBSD: patch-src_util_h,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- src/util.h.orig Sat Oct 1 06:32:19 2005
|
||||
+++ src/util.h Tue Oct 18 18:04:58 2005
|
||||
@@ -40,7 +40,9 @@ void chomp (char *string);
|
||||
char * ltrim (char *str);
|
||||
char * rtrim (char *str);
|
||||
int lc (char *buff, const char *string);
|
||||
+#ifndef __HAVE_STRCASESTR__
|
||||
char * strcasestr (const char *, const char *);
|
||||
+#endif
|
||||
|
||||
#define ALLTRIM(str) ltrim(rtrim(str))
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-webui_cgi-bin_dspam_cgi,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
--- webui/cgi-bin/dspam.cgi.orig Sun Oct 16 16:43:36 2005
|
||||
+++ webui/cgi-bin/dspam.cgi Mon Oct 17 22:57:56 2005
|
||||
@@ -195,8 +195,8 @@ sub DisplayHistory {
|
||||
}
|
||||
close (LINES);
|
||||
|
||||
- $end = $all_lines - (($history_site-1) * $CONFIG{'HISTORY_PER_SITE'});
|
||||
- $begin = $end - $CONFIG{'HISTORY_PER_SITE'} + 1 ;
|
||||
+ $end = $all_lines - (($history_site-1) * $CONFIG{'HISTORY_PER_PAGE'});
|
||||
+ $begin = $end - $CONFIG{'HISTORY_PER_PAGE'} + 1 ;
|
||||
|
||||
if ($begin < 0) {
|
||||
$begin = 1;
|
@ -9,11 +9,6 @@ positives.
|
||||
|
||||
Available flavors are:
|
||||
|
||||
- daemon: add the ability to run dspam as multiple clients connecting to a
|
||||
central server. This flavor is required in order to use the --daemon and
|
||||
--client command-line switches. However, the daemon mode is currently
|
||||
incompatible with sqlite.
|
||||
|
||||
- clamav: enable usage of the clam antivirus.
|
||||
|
||||
- ldap: include support for LDAP verification.
|
||||
|
@ -1,4 +1,5 @@
|
||||
@comment $OpenBSD: PFRAG.hash,v 1.1 2005/10/26 06:18:39 jakob Exp $
|
||||
@comment $OpenBSD: PFRAG.hash,v 1.2 2005/11/23 08:52:49 jakob Exp $
|
||||
bin/cssclean
|
||||
bin/csscompress
|
||||
bin/cssconvert
|
||||
bin/cssstat
|
||||
|
Loading…
Reference in New Issue
Block a user