dspam WebUI

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.

Configuring the web interface for dspam.

http://www.mbse.eu/linux/homeserver/mail/dspam/ - has details for running dspam under nginx.

Prerequisites
For the WebUI graphs, install the the GD Graphics Library:

yum install gd-devel

Then install the necessary Perl modules:

  • yum:
    yum install perl-GDGraph3d perl-GD perl-CGI perl-GDTextUtil

    CentOS 7:

    yum install perl-GD perl-CGI
    perl -MCPAN -e shell
    install Test::More
    install GD::Graph3d
    install GD::Text
  • CPAN:
    perl -MCPAN -e shell
    install Test::More
    install GD
    install GD::Graph3d
    install GD::Text
    install CGI

Installation

cd /extra/src/dspam-3.10.2
mkdir /var/websites/dspam /var/websites/dspam/logs
cp -R webui/cgi-bin /var/websites/dspam/
cp -R webui/htdocs /var/websites/dspam/

Edit /usr/local/apache2/conf/extra/httpd-vhosts.conf:

  • Apache 2.2:
    <VirtualHost *:80>
      SuexecUserGroup simscan simscan
      ServerAdmin dspam@example.com
      DocumentRoot /var/websites/dspam/htdocs
      ServerName dspam.example.com

      ErrorLog /var/websites/dspam/logs/dspam-error_log
      CustomLog /var/websites/dspam/logs/dspam-access_log combined

      Redirect /index.html http://dspam.example.com/cgi-bin/dspam.cgi

      <Directory /var/websites/dspam/htdocs>
        Options Indexes FollowSymLinks
        allow from all
        Order allow,deny
      </Directory>
      <Directory /var/websites/dspam/cgi-bin>
        allow from all
        Options ExecCGI
        Order deny,allow
      </Directory>
      ScriptAlias /cgi-bin/ /var/websites/dspam/cgi-bin/
    </VirtualHost>

  • Apache 2.4:
    <VirtualHost *:80>
      SuexecUserGroup simscan simscan
      ServerAdmin dspam@example.com
      DocumentRoot /var/websites/dspam/htdocs
      ServerName dspam.example.com

      ErrorLog /var/websites/dspam/logs/dspam-error_log
      CustomLog /var/websites/dspam/logs/dspam-access_log combined

      Redirect /index.html http://dspam.example.com/cgi-bin/dspam.cgi

      <Directory /var/websites/dspam/htdocs>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
      </Directory>
      <Directory /var/websites/dspam/cgi-bin>
        Options ExecCGI
        Require all denied
      </Directory>
      ScriptAlias /cgi-bin/ /var/websites/dspam/cgi-bin/
    </VirtualHost>

Adjust permissions on WebUI files:

chown simscan:simscan -R /var/websites/dspam

Edit /var/websites/dspam/cgi-bin/configure.pl and comment out:

#$CONFIG{'AUTODETECT'} = 1;

Uncomment the following group of lines, and change DOMAIN_SCALE to 1:

$CONFIG{'AUTODETECT'} = 0;
$CONFIG{'LARGE_SCALE'} = 0;
$CONFIG{'DOMAIN_SCALE'} = 1;
$CONFIG{'PREFERENCES_EXTENSION'} = 0;

Modify the following line with your domain:

$CONFIG{'LOCAL_DOMAIN'} = "yourdomain.com";

Default user preferences
Edit /var/websites/dspam/cgi-bin/default.prefs:

# Training Mode: TEFT, TOE, TUM, NOTRAIN
trainingMode=TOE

# Spam Action: quarantine, tag, deliver
spamAction=tag

# Spam Subject: the text to be prepended onto the subject line of tagged spams
spamSubject=[SPAM]

# Bayesian Noise Reduction: on/off
enableBNR=on

# Automatic Whitelisting: on/off
enableWhitelist=on

# Statistical Sedation: 0-10
statisticalSedation=5

# Signature Location: message, headers, attachment
signatureLocation=headers

Add admin users
To give a user administrative privileges in the WebUI, add their username/email to /var/websites/dspam/cgi-bin/admins.

Lighttpd
http://dspamwiki.expass.de/Web_Interface_with_lighttpd

Recent Updates

  • 1 week 6 days ago
    1.27.2 update
  • 3 weeks 3 days ago
    Drupal 10/11 config
  • 3 weeks 4 days ago
  • PHP
    3 weeks 4 days ago
    PHP 8.3.11 and AlmaLinux
  • 3 weeks 5 days ago
    New version of Pound