tar xzvf DBD-mysql-4.003.tar.gz
cd DBD-mysql-4.003
perl Makefile.PL
make
make install
修改php.ini檔中以下的參數
vi /etc/php.ini
short_open_tag = On
safe_mode = Off
register_globals = Off
magic_quotes_gpc = On
magic_quotes_runtime = Off
session.auto_start = 0
tar zxvf mailwatch-1.0.3.tar.gz
cd mailwatch
mysql -p < create.sql 建立名為 mailscanner 資料庫
Enter password: 輸入 mysql 中 root 的密碼,如果 root 沒有設定密碼 -p 參數不用加
建立一組 MySQL 的帳號及密碼,透過此組帳號將 Mailscanner 的 log 寫進 mailscanner 資料庫
mysql -p
Enter password: 輸入 mysql 中 root 的密碼,如果 root 沒有設定密碼 -p 參數不用加
mysql> GRANT ALL ON mailscanner.* TO mailwatch@localhost IDENTIFIED BY '<password>';
mysql> GRANT FILE ON *.* TO mailwatch@localhost IDENTIFIED BY '<password>';
mysql> FLUSH PRIVILEGES;
將 MailWatch.pm 檔案中的 $db_user and $db_pass 值,改成剛建立的帳號及密碼
vi MailWatch.pm
編輯 conf.php 檔案中的 DB_USER and DB_PASS 應該在30及31行,更改最早建立的 mailwatch 帳號及密碼
修改 /etc/MailScanner/MailScanner.conf 的參數
Always Looked Up Last = &MailWatchLogging
Detailed Spam Report = yes
Quarantine Whole Message = yes
Quarantine Whole Message As Queue Files = no
Include Scores In SpamAssassin Report = yes
Quarantine User = root
Quarantine Group = apache (this should be the same group as your web server)
Quarantine Permissions = 0660