mailscanner

安裝:
這裡安裝

要手動更新病毒檔案的話,使用freshclam來做UPDATE

關於更新MAILSCANNER的方法:(使用此方法時一步一步按照說明去做就對了)
http://forums.cpanel.net/showthread.php?s=&threadid=21290&perpage=15&highlight=howto%20mailscanner&pagenumber=1

有空的話還可以進一步安裝:
http://mailwatch.sourceforge.net/

最後,為了不要讓/var/spool/mailscaner一直慢慢變大,因為被發現的病毒檔案會放置在此,所以我們要做一個自動將這些目錄以及檔案刪除的程式放在/usr/mailscanner/bin/clean.quarantine.pl,然後設定權限755,並將他放到crontab每天執行一次:
#!/usr/bin/perl

#
# IMPORTANT NOTE:
#
# Change the next line to 0 instead of 1 to enable this script.
# By default it will be disabled and will not do anything.
#

$disabled = 0;

$quarantine_dir = \'/var/spool/MailScanner/quarantine\';
$days_to_keep = 3;

exit if $disabled;

# Standardise the format of the directory name
die \'Path for quarantine_dir must be absolute\' unless $quarantine_dir =~ /^\\//;
$quarantine_dir =~ s/\\/$//; # Delete trailing slash

# Now get the content list for the directory.
opendir(QDIR, $quarantine_dir) or die \”Couldn\'t read directory $quarantine_dir\”;

# Loop through this list looking for any *directory* which hasn\'t been
# modified in the last $days_to_keep days.
# Unfortunately this will do nothing if the filesystem is backed up using tar.
while($entry = readdir(QDIR)) {
next if $entry =~ /^\\./;
$entry = $quarantine_dir . \'/\' . $entry;
system(\”rm -rf $entry\”) if -d $entry &&
-M $entry > $days_to_keep;
}
closedir(QDIR);

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *