Database Maintenance

Nightly script to purge the dspam database of old information.

Performance Tuning

Copy the SQL purge script from the source directory:

mkdir /var/dspam/sql
cp /extra/src/dspam-3.10.2/src/tools.mysql_drv/purge-4.1.sql \
/var/dspam/sql/mysql_purge-4.1.sql

Copy the maintenance script:

cp /extra/src/dspam-3.10.2/contrib/dspam_maintenance/dspam_maintenance.sh \
/usr/local/bin/dspam_maintenance

Edit the script with some default options:

DSPAM_CONFIGDIR="/usr/local/etc"
DSPAM_HOMEDIR="/var/dspam"
DSPAM_PURGE_SCRIPT_DIR="/var/dspam/sql"
DSPAM_BIN_DIR="/usr/local/bin"
MYSQL_BIN_DIR="/usr/local/mysql/bin"

Test the script out:

/usr/local/bin/dspam_maintenance --verbose

Create a cron task to run it nightly:

cd /etc/cron.d
echo "0 0 * * * root /usr/local/bin/dspam_maintenance >/dev/null 2>&1" > dspam
touch /etc/crontab

Optimizing purge-4.1.sql

Purging a user
Script to delete dspam users

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Recent Updates

  • 1 year 12 months ago
  • 1 year 12 months ago
  • 1 year 12 months ago
    php 8.x
  • 1 year 12 months ago
    10.6.7
  • 2 years 10 hours ago
    Drop Centos 5/6 stuff