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. == Perl modules == 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: {{{ # cpan }}} 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 [[http://www.cpan.org|www.cpan.org]]. Once CPAN is configured, you can install the needed Perl modules with the following commands: {{{ cpan> install DBI cpan> install DBD::Pg cpan> install Config::IniFiles cpan> install Net::DNS }}} If these modules need other modules to work, and CPAN asks you whether or not to install the dependencies, answer yes. == Database == This manual assumes you already have PostgreSQL or MySQL installed and running. If not, then please get a version for your OS and install it using the guidelines of that package. === PostgreSQL Spamikaze database creation === Creating the spamikaze database needs to be done by hand. Importing the database schema is automated. {{{ # 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 === At the prompt, use mysqladmin to create a new database. {{{ $ mysqladmin -u root -p create spamikaze }}} You will be prompted for the MySQL root password; enter it. If no errors are shown, you need to login as MySQL root to the database server in order to grant privileges to the new spamikaze directory: {{{ $ mysql -u root -p mysql }}} Again, you will be prompted for MySQL root's password; enter it. 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; }}} The last thing to do with MySQL is read the "spamikaze-mysql.sql" file into the newly created database. {{{ $ mysql -u root -p spamikaze < /path/to/spamikaze-mysql.sql }}} ---- CategoryDocumentation