Академический Документы
Профессиональный Документы
Культура Документы
INTRODUCTION
You must have a working MailScanner set-up and have running copies of MySQL, Apache, and PHP with MySQL and GD support. For MailScanner to log to a MySQL database you need Perl-DBI and Perl-DBD-MySQL installed. Newer version of MailWatch (version 1.0.3) work with all versions of DBDmysql For MailWatch version 0.5.1 and earlier, MailWatch only works with DBD-mysql-2.1028, and DBDmysql-2.1028 only works with version of MySQL Database less than 4.1. Thus, version 4.0.x must be used for MailWatch. You can obtain version 2.1028 of Perl-DBD-MySQL from here: http://search.cpan.org/CPAN/authors/id/J/JW/JWIED/DBD-mysql-2.1028.tar.gz To Install DBD-mysql-2.1028, the following must be executed exactly as shown: 1. tar xzvf DBD-mysql-2.1028 2. cd DBD-mysql-2.1028 3. perl Makefile.PL cflags=-I/usr/local/src/mysql/include libs=-L/usr/local/src/mysql/lib lmysqlclient 4. make 5. make test 6. make install
PHP
PHP should have the following set in php.ini: short_open_tag = On safe_mode = Off register_globals = Off magic_quotes_gpc = On magic_quotes_runtime = Off session.auto_start = 0
INSTALLATION
All commands below should be run as the 'root'. It is assumed the file has been unpacked to /usr/local/src.
Page 1 of 11
3. Create conf.php by copying conf.php.example and edit the values to suit, you will need to set DB_USER and DB_PASS to the MySQL user and password that you created in Step 2. These should also match those same values in MailWatch.pm. cp conf.php.example conf.php // Database settings define(DB_TYPE, 'mysql'); define(DB_USER, 'mailwatch'); define(DB_PASS, 'mailwatch'); define(DB_HOST, 'localhost'); define(DB_NAME, 'mailscanner'); NOTE: With MailWatch 1.0 and latter versions, you can use the quarantine more effectively when used with MailScanner version 4.43. Some code was added for MailWatch to keep track of messages quarantined by using a flag in the maillog table. This means that MailWatch 1.0 is much faster when you have a large quarantine directory. The new quarantine report requires the use of the new functionality, so you must upgrade if you want to run this. The new quarantine flag is not used by default. If you have MailScanner Verions 4.43 or later, you can activate the new functionality by setting QUARANTINE_USE_FLAG to true in conf.php. If you do this, you must disable the clean.quarantine script supplied by MailScanner and use the new quarantine_maint.php script in the tools directory instead. To clean the quarantine, set QUARANTINE_DAYS_TO_KEEP quarantine_maint clean. This should then be run daily from cron. in conf.php and run
6. Create the 'new' bayes directory, make the directory owned by the same group as the web server user and make the directory setgid: mkdir /etc/MailScanner/bayes chown root:nogroup /etc/MailScanner/bayes chmod g+rws /etc/MailScanner/bayes 7. Copy the existing bayes databases and set the permissions: cp /root/.spamassassin/bayes_* /etc/MailScanner/bayes chown root:nogroup /etc/MailScanner/bayes/bayes_* chmod g+rw /etc/MailScanner/bayes/bayes_* 8. Test SpamAssassin to make sure that it is using the new databases correctly: spamassassin -D -p /etc/MailScanner/spam.assassin.prefs.conf --lint 9. Start MailScanner up again: sh /etc/init.d/MailScanner start && tail -f /var/log/mail/mail You now have MailScanner logging to MySQL.
Page 5 of 11
Page 6 of 11
Page 7 of 11
Page 8 of 11
Page 9 of 11
Page 10 of 11
Page 11 of 11