HowTo - Tie::RDBM on Gentoo Linux
From ASSPSMTP
This method tested on Gentoo Linux.
On This Page |
Install
First, make sure your Portage tree is up to date:
emerge sync
Now you need to add the relevant Perl module. If you have not yet done so, first add the Gentoo g-cpan tool to locate and install CPAN modules:
emerge g-cpan
Now use g-cpan to install the Tie::RDBM module:
g-cpan -i Tie::RDBM
Next, Tie::RDBM will need access to various MySQL libraries, so install MySQL:
emerge mysql
Database configuration
Go to your MySQL server and log-in to mysql as root. Next, create a database and mysql user called assp. Grant the 'assp' user rights to the assp database. The assp user will need the following rights: Select | Insert | Update | Delete | Create | Drop | Index | Alter | Create temp. Some people can easily do this using a Linux bash shell, but I use webmin for such tasks. Hint: emerge webmin
If the database is running on a different host than your assp spam filter, you may need to update the MySQL db configuration to enable network access. Do this by editing the file /etc/mysql/my.cnf Ensure the line "bind-address 127.0.0.1" starts with a # (which means it is commented out and therefore has no effect).
ASSP configuration
Use the ASSP web GUI to change various ASSP variables to enable ASSP to use MySQL. The variables that need changing are located in the "File Paths" section of the web GUI. The variables are called: whitelistdb, redlistdb, delaydb, myhost, mydb, myuser and mypassword. Now use the ASSP web GUI to restart ASSP
Check the maillog and you should see:
* Aug-21-07 00:01:01 Tie::RDBM module version 0.70 installed - mysql usage available
To do
How to import data from flat-file whitelist etc.
Requirements
Requirements for actually using the mysql storage:
* Mysql server * Database for ASSP to use.


