There are two related problems. Firstly, the execution of the sqlite purge script (${DSPAM_SQLite_PURGE_SQL} or ${DSPAM_SQLite3_PURGE_SQL}) will only occur for the first database found by the find command since the SQL file is being redirected to the find command and not the sqlite/sqlite3 command. Secondly, the execution of the "vacuum;" is being echoed to the console (and will thus be redirected to the administrator's email by cron) rather than being executed. Reproducible: Always Steps to Reproduce: 1. Allow the dspam.cron to be run daily 2. Watch for the email from the cron daemon with the body "vacuum; | /usr/bin/sqlite3 /var/spool/dspam/data/local/<username>/<username>.sdb", for each user, which will happen every day Actual Results: The purge script will only run for the first user database found, and the vacuum will not be run for any database. Expected Results: The purge script should run for each user database found, as should the vacuum. I have patched my copy to fix the problem. While the fix I propose is for both sqlite and sqlite3, I have only tested it on sqlite3, since that is what I have installed. Please find the patch for dspam-3.8.0.cron (in /usr/portage/mail-filter/dspam/files) attached. Output from emerge --info follows: Portage 2.1.2.9 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r3, 2.6.18.6 i686) ================================================================= System uname: 2.6.18.6 i686 Intel(R) Xeon(TM) CPU 2.40GHz Gentoo Base System release 1.12.9 Timestamp of tree: Sun, 01 Jul 2007 01:00:10 +0000 ccache version 2.4 [enabled] dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r7 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=pentium3 -O2 -pipe" DISTDIR="/usr/local/distfiles" FEATURES="ccache distlocks fixpackages metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" MAKEOPTS="-j3" PKGDIR="/usr/local/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects /usr/portage/local/layman/sunrise /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa apache2 arts audiofile berkdb bitmap-fonts bonobo bzip2 cdr cli cracklib crypt cups curl dbus dri dvdr encode exif fam ffmpeg flac foomaticdb gdbm gif gimpprint glut gmp gpm gstreamer gtk gtk2 gtkhtml guile iconv idn imagemagick imap imlib immqt-bc ipv6 isdnlog jack joystick jpeg lcms libg++ lirc logrotate mad matroska midi mikmod mng mozilla moznocompose moznoirc moznomail mozsvg mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre perl png postgres ppds pppd python qt3 qt4 quicktime readline real reflection ruby ruby18 scanner sdl session slang speex spell spl sse ssl startup-notification svg svga tcl tcltk tcpd tetex tiff tk truetype truetype-fonts type1-fonts unicode usb vorbis x86 xml xorg xprint xv zlib zsh-completion" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="livedrive_midi" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vga" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 123877 [details, diff] Patch to files/dspam-3.8.0.cron that allows the sqlite purge script and vacuum to run properly
Fixed in -r2. Thanks!