Mail-SpamCannibal

 view release on metacpan or  search on metacpan

pods/INSTALL.pod  view on Meta::CPAN

        ./sc_BLcheck.pl -v path/to/config.file

  The -d switch allows you to see what the 
  script will do without any db updates 
  taking place. The -v switch will print
  the scripts actions to the screen. 
  -v -v does it more verbosely.
  The -d switch implies a single -v.

In the ./config directory

  cp sc_BLackList.conf.sample sc_BLackList.conf

The sc_BLackList.conf file is heavily commented and pre-loaded with several
working DNSBLS entries. You may wish to delete some of these or add one of
your favorite ones.

=head3 activating sc_BLpreen.pl

B<sc_BLpreen.pl> periodically validates the entries found in the
B<blcontrib> database and removes those which the original DNSBLS no longer
blacklists or those for which the DNSBLS can not be contacted for a time
specified in the config file for that DNSBLS.

Login as the spamcannibal user and put an entry in your crontab something
like this:

  # check valid blcontrib every few days
  21 0 */4 * * ./scripts/sc_BLpreen.pl ./config/sc_BlackList.conf

Since this is a background job, a better entry might be:

  21 0 */4 * * /usr/bin/nice -n 20 ./scripts/sc_BLpreen.pl ./config/sc_BlackList.conf

  Syntax: ./sc_BLpreen.pl path/to/config.file
    or
        ./sc_BLpreen.pl -d path/to/config.file
        ./sc_BLpreen.pl -v path/to/config.file

  The -d switch allows you to see what the 
  script will do without any db updates 
  taking place. The -v switch will print
  the scripts actions to the screen. 
  -v -v does it more verbosely.
  The -d switch implies a single -v.

=head3 activating sc_cleanup.pl

B<sc_cleanup.pl> periodically runs through the databases and I<optionally>
expires very old records and checks that there are not multiple entries in
the database for the same IP address or an entry that is present in one
database that is missing a corresponding entry in a companion database. 

For example:

=over 2

A spam messages arrives and makes it through the system to your in box.
Subsequently, sc_BLcheck.pl finds the IP address of the spam host in a
remote DNSBL and adds records to the B<tarpit> and B<blcontrib> databases.
You find the spam on your desktop and add it to the B<tarpit> and
B<evidence> databases via the sc_mailfilter.pl robot script. Now there is an
extra record in B<blcontrib> that is unused. 

=back

There are many more possible
ways for such inconsistencies to occur and B<sc_cleanup.pl> removes these
records automatically.

Login as the spamcannibal user and put an entry in your crontab something
like this:

  # check valid blcontrib every few days
  21 0 */4 * * ./scripts/sc_cleanup.pl

Since this is a background job, a better entry might be:

  21 0 */4 * * /usr/bin/nice -n 20 ./sc_cleanup.pl

  Syntax: scripts/sc_cleanup.pl -q
    or
        scripts/sc_cleanup.pl -d
        scripts/sc_cleanup.pl -v
    or
        scripts/sc_cleanup.pl [options] -x nnn


The -q switch is for normal, quiet operation.
The -d switch allows you to see what the 
script will do without any db updates 
taking place. The -v switch will print
the scripts actions to the screen. 
The -d switch implies a -v.

The -x switch expires records more than 'nnn'
days old and removes them from the database.

=head2 Setting up the DNS blacklist daemon

The first part of the installation guide assumes that the host has no other
DNS daemon running. Section 2 covers running a DNSBL along with a
conventional DNS. In either case, an NS record must be added to the zone
file for the blacklist domain.

=for html If you will be running the SpamCannibal L<sc_dbwatch|"Setting up the DB watch daemon"> daemon
(recommended) then do not add the DNSBLserver/rc.dnsbls script to your hosts
startup directory or procedure. Otherwise, copy DNSBLserver/rc.dnsbls the appropriate 
startup directory and edit the host startup scripts so that it is included. See:
<blockquote>
<a href=rc.dnsbls.html>rc.dnsbls</a>
<br>
<a href=Mail-SpamCannibal-DNSBLserver.html>man dnsbls</a>
</blockquote>
for command line details.

Login as the spamcannibal user.

  cd ./config
  cp dnsbls.conf.sample dnsbls.conf



( run in 0.581 second using v1.01-cache-2.11-cpan-ceb78f64989 )