Hello there,
I've been monitoring the recent activity here of a possible dspam fork
in order to restore development to the project.
As I've just recently set up dspam in 'standalone' mode, (a poorly
documented process!), I encountered a few bugs within dspam that have
since been patched.
The first was an issue where dspam was unable to re-connect to a remote
MySQL database after the specified period of inactivity had elapsed.
The second was an issue where users were getting first-run notifications
twice.
For anyone interested, the details of my struggles have been documented
here:
http://forums.gentoo.org/viewtopic-t-580207-highlight-.html
In fact, if DSPAM does fork, the gentoo project's latest version may be
a good place to start, as there are several other 'aftermarket' patches
and bug fixes being incorporated already.
Hope this helps.
--- dspam-3.8.0/src/mysql_drv.c 2006-09-21 20:25:19.000000000 +0200
+++ dspam-3.8.0-new/src/mysql_drv.c 2007-09-21 22:12:17.092607928 +0200
@@ -2489,6 +2489,16 @@
goto FAILURE;
}
+#if MYSQL_VERSION_ID >= 50013
+ /* enable automatic reconnect for MySQL >= 5.0.13 */
+ snprintf(attrib, sizeof(attrib), "%sReconnect", prefix);
+ if (_ds_match_attribute(CTX->config->attributes, attrib, "true"))
+ {
+ my_bool reconnect = 1;
+ mysql_options(dbh, MYSQL_OPT_RECONNECT, &reconnect);
+ }
+#endif
+
if (hostname[0] == '/')
{
if (!mysql_real_connect (dbh, NULL, user, password, db, 0, hostname,
diff -Naur dspam-3.8.0.orig/src/dspam.c dspam-3.8.0/src/dspam.c
--- dspam-3.8.0.orig/src/dspam.c 2006-12-12 07:33:45.000000000 -0800
+++ dspam-3.8.0/src/dspam.c 2007-09-21 15:13:58.000000000 -0700
@@ -4014,6 +4014,9 @@
LOGDEBUG("sending firstrun.txt to %s (%s): %s",
CTX->username, filename, strerror(errno));
send_notice(ATX, "firstrun.txt", ATX->mailer_args, CTX->username);
+ /*write firstrun file for new users after sending once*/
+ _ds_prepare_path_for(filename);
+ /*endfix*/
file = fopen(filename, "w");
if (file) {
fprintf(file, "%ld\n", (long) time(NULL));
@@ -4038,6 +4041,9 @@
LOGDEBUG("sending firstspam.txt to %s (%s): %s",
CTX->username, filename, strerror(errno));
send_notice(ATX, "firstspam.txt", ATX->mailer_args, CTX->username);
+ /*write firstspam file for new users after sending once*/
+ _ds_prepare_path_for(filename);
+ /*endfix*/
file = fopen(filename, "w");
if (file) {
fprintf(file, "%ld\n", (long) time(NULL));