The Spamikaze scripts should be installed on disk somewhere; in this manual we'll assume the scripts are installed in /opt/spamikaze/scripts, but it really doesn't matter where they are. The Perl module (Spamikaze.pm) should either be installed in the same directory as the scripts, or somewhere else in Perl's search path.
The basic Spamikaze configuration needs the following 3rd party Perl modules: DBI, Config::IniFiles, and Net::DNS, as well as either DBD::mysql or DBD::Pg depending on your choice of database. If you wish to archive received spamtrap email in a news server, also install News::NNTPClient. If your OS does not have these Perl modules available as ready packages, they can be installed using the CPAN shell. As root, run the following command to enter the CPAN shell:
If this is the first time you are using CPAN, you will need to answer a number of questions in order to configure the software. If you need help, you can find documentation on www.cpan.org. Once CPAN is configured, you can install the needed Perl modules with the following commands:
PostgreSQL Spamikaze database creation
# su - postgres $ psql postgres=# CREATE USER spamikaze WITH PASSWORD 'spamPassword'; postgres=# CREATE DATABASE spamikaze; postgres=# \q $ psql -d spamikaze -a -f /path/to/spamikaze/schemas/spamikaze-pgsql-3.sql
If the user name under which the Spamikaze scripts run differs from the database user name, pg_hba.conf may need to be edited to allow authentication with encrypted passwords (md5), instead of the default "ident" authentication scheme.
MySQL Spamikaze database creation
Once you are in, you should grant privileges to a user at either the localhost or a webserver able to access this MySQL server. It is not recommended to use a remote server without using some sort of encryption. The following example will use the user "spamikaze" at localhost. You need to grant Select, Insert, and Update privileges at least. It is recommended to hold back any other privileges at this time:
mysql> GRANT SELECT, INSERT, UPDATE ON spamikaze.* TO spamikaze@localhost IDENTIFIED BY 'spamPassword'; mysql> FLUSH PRIVILEGES;