I’ve chosen to use a MySQL database to let DSPAM store all it’s data, this means we need to create a new database called dspam:

mysqladmin -p create dspam

Next we will use the scripts provided in the DSPAM source code tree to create all the tables required:

mysql -p dspam < ./src/tools.mysql_drv/mysql_objects-4.1.sql

Next you need to create the dspam database user using the MySQL terminal program:

grant all on dspam.* to dspam@localhost identified by ‘dspampassword’;

Because we have virtual users in our system you will need to add this extra virtual user table by using another SQL script from the source:

mysql -p dspam < ./src/tools.mysql_drv/virtual_users.sql

Next step: Configuring DSPAM