1. Install Tie::RDBM  and  the perl DBI driver for your DB
2. you need the file  assp_db_import.cfg in your assp base directory
3. create the DB (tablesace / schema / ....) depends on the DB-type
5. create a DB-user with full rights to this DB (minimum is create/alter/delete table)
6. go to ASSP-web configuration section <File Path and Database>
7. configure the db <myhost> <DBdriver> (the available are shown in help text) <mydb> <myuser> <mypassword>
8. configure any of the following ASSP-options of your choice to the value  DB:  (case sensitive!!!!)
spamdb
whitelistdb
redlistdb
delaydb
ldaplistdb
pbdb  (in section penalty box)
 
9. stop and start ASSP
 
 
you should see the following messages on ASSP start:
 
Mar-18-08 08:20:15 Tie::RDBM module version 0.70 installed - database usage available
.....
Mar-18-08 08:20:16 Try using mysql database <your dbname> for selected tables
 
(the name of my DB is  assp)
 
Mar-18-08 08:20:18 Using table <whitelist>      in mysql Database <assp> instead of file c:\assp/whitelist
Mar-18-08 08:20:18 Using table <redlist>        in mysql Database <assp> instead of file c:\assp/redlist
Mar-18-08 08:20:18 Using table <delaydb>        in mysql Database <assp> instead of file c:\assp/delaydb
Mar-18-08 08:20:18 Using table <delaywhitedb>   in mysql Database <assp> instead of file c:\assp/delaydb.white
Mar-18-08 08:20:19 Using table <PBWhite>        in mysql Database <assp> instead of file c:\assp/pb/pbdb.white.db
Mar-18-08 08:20:19 Using table <PBBlack>        in mysql Database <assp> instead of file c:\assp/pb/pbdb.black.db
Mar-18-08 08:20:19 Using table <RBLCache>       in mysql Database <assp> instead of file c:\assp/pb/pbdb.rbl.db
Mar-18-08 08:20:19 Using table <URIBLCache>     in mysql Database <assp> instead of file c:\assp/pb/pbdb.uribl.db
Mar-18-08 08:20:20 Using table <PTRCache>       in mysql Database <assp> instead of file c:\assp/pb/pbdb.ptr.db
Mar-18-08 08:20:20 Using table <MXACache>       in mysql Database <assp> instead of file c:\assp/pb/pbdb.mxa.db
Mar-18-08 08:20:20 Using table <RWLCache>       in mysql Database <assp> instead of file c:\assp/pb/pbdb.rwl..db
Mar-18-08 08:20:21 Using table <SPFCache>       in mysql Database <assp> instead of file c:\assp/pb/pbdb.spf.db
Mar-18-08 08:20:21 Using table <SBCache>        in mysql Database <assp> instead of file c:\assp/pb/pbdb.sb.db
Mar-18-08 08:20:21 Using table <PBTrap>         in mysql Database <assp> instead of file c:\assp/pb/pbdb.trap.db
Mar-18-08 08:20:21 Using table <spamdb>         in mysql Database <assp> instead of file c:\assp/spamdb
Mar-18-08 08:20:21 Using table <spamdbhelo>     in mysql Database <assp> instead of file c:\assp/spamdb.helo
Mar-18-08 08:20:22 Using table <ldaplist>       in mysql Database <assp> instead of file c:\assp/ldaplist
 
Thomas
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no known virus in this email!

Attachment: assp_db_import.cfg
Description: Binary data

This should be a short whitepaper to configure and use ASSP with any supported 
database.
This whitepaper assumes, that you have the needed knowledge about databases and 
there management!

To use other databases then MySQL, to have import-,backup- and export functions 
and to use databases for the penaltybox and
spamdb you need a ASSP version 1.3.6 or above! There has to be a file 
assp_db_import.cfg in ASSP root directory!!!!

requirements:

- a database / tablespace whith index/key support (like 
MySQL,Pg,Oracle,MSSQL,Informix,DB2 and others)
- a databaseuser with read/write and Create/Alter-Table permission
- perl Tie::RDBM module (from CPAN or PPM) - all also required modules will be 
also installed by default
- perl DBD::(your database) driver - you can see the installed drivers in the 
Webinterface-section "File Path and Database"
  under DBdriver. If you can not find a perl driver for your database, you can 
also use ODBC or ADO - if your OS supports that.


configuration:

you have to define:

- myhost:
The host (name or ip address) to connect to the database. Some database drivers 
do not need this parameter - but it must be
already set.

- DBdriver: 
The database driver used to access your database - DBD-driver. The following 
drivers are available on your system:
ADO|AnyData|CSV|DBM|ExampleP|File|Gofer|Mock|ODBC|Oracle|Proxy|SQLRelay|SQLite|SQLite2|Sponge|mysql|mysqlPP
If you can not find the driver for your database in this list, you should 
install it via cpan or ppm!
- or if you have installed an ODBC-driver for your database and DBD-ODBC, just 
create a DSN and use ODBC.
Usefull are ADO|DB2|Informix|ODBC|Oracle|Pg|Sybase|mysql|mysqlPP - but any 
other SQL compatible database should also work.

syntax examples: driver,option1,option2,...,...
ADO,[DSN=mydsn]
DB2
Informix
ODBC,DSN=mydsn|driver={SQL Server},Server=server_name
Oracle,SID=1|INSTANCE_NAME=myinstance|SERVER=myserver|SERVICE_NAME=myservice_name,[PORT=myport]
Pg,[PORT=myport]
Sybase,SERVER=myserver,[PORT=myport]
mysql,[PORT=myport]
mysqlPP,[PORT=myport]

The options and there possible or required order depending on the used 
DBD-driver, please read the drivers documentation, if you do not
know the needed option. The username, password, host and databasename are 
always used from this configuration page. 

- mydb:
This database must exist before starting ASSP, necessary tables will be created 
automatically into this database.

- myuser:
  the database user
- mypassword:
  the password of the database user

There are more parameters to set, but this parameters have default values and 
they are descripted in the configuration screen!

Now define a value "DB:" for all lists and caches you want to use a database 
table for 
(whitelist,delaydb,pbdb,spamdb,redlist).
You do not need to use all of them, you have the choice to select!

If you are here - go back to the top and verify all your settings!

This is a good time to restart ASSP - you have to do this any time, you have 
changed any database related parameters listed
above!
How ever - ASSP should now be ready to work. If you have made an upgrade form 
an earlyer version, you can import your old
files in to the database. To do this, there are two ways: you can use the 
ImportMysqlDB-option in the webinterface and import
will be done by ASSP every time it starts and it finds a import-file in the 
import-directory.
You need to configure "importDBDir" and you have to copy all files you want to 
import in to this directory. Now rename this
files to *.add or *.rpl what ever you want ASSP to do - an ADD or a REPLACE 
records in to the database.

Files can be:
- pbdb.black.db.(add|rpl)
- pbdb.mxa.db.(add|rpl)
- pbdb.ptr.db(add|rpl)
- pbdb.rbl.db.(add|rpl)
- pbdb.rwl.db.(add|rpl)
- pbdb.spf.db.(add|rpl)
- pbdb.uribl.db.(add|rpl)
- pbdb.white.db.(add|rpl)
- redlist.(add|rpl)
- whitelist.(add|rpl)
- spamdb.(add|rpl)
- spamdb.helo.(add|rpl)
- delaydb.(add|rpl)
- delaydb.white.(add|rpl)
Use the extension "add" or "rpl" to add or replace the records to the tables.
Only files for database-enabled tables will be imported 
"pbdb|spamdb|redlist|whitelist|delaydb"! 

At this time all functions of ASSP are well tested with 
MySQL(ODBC/direct),MSSQL(ODBC/ADO) and Oracle(ODBC/direct),
but it should work with any other database, as long as you have a perl driver 
for that. Only if you want to use the
import function with you database, you may get DBI errors. In this case the 
file assp_db_import.cfg should be modified
for your database. Please change ASSP in to debug mode, stop ASSP, rename the 
maillog.txt,
prepaire the import directory and start ASSP. Please send the following 
informations to ASSP group:
database type and version - and the maillog.txt with the errors.
If you have some knowledge in SQL you can try to add a section for your 
database to the assp_db_import.cfg file!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to