我正在使用Linux恶意软件检测来扫描恶意软件并进行报告,但每天都会收到用户电子邮件(主要是垃圾邮件文件夹)中恶意软件的警报。 我不希望这样的警报,垃圾邮件文件夹经常清理,用户也可以清理它。
我尝试将通配符添加到/ usr / local / maldetect / ignore_paths,如下所示,但不会被忽略:
/home/*/homes/*/Maildir /home/?/homes/?/Maildir
有谁知道如何使用通配符排除文件夹,因为添加每个用户邮件目录的完整path是不实际的。
谢谢
我只find了
/usr/local/maldetect/ignore_inotify A line spaced file for regexp paths that are excluded from inotify monitoring Sample ignore entry: ^/home/user$ ^/var/tmp/#sql_.*\.MYD$
http://www.rfxn.com/appdocs/README.maldetect
如果你使用inotify监视文件(flag -m),那么它可以帮助你。
根据maldet的这个代码:
if [ "$days" == "all" ]; then if [ -z "$setmodsec" ]; then eout "{scan} building file list for $spath, this might take awhile..." 1 fi $find $spath $tmpdir_paths -maxdepth $maxdepth -type f -size +${minfilesize}c -size -$maxfilesize $ignore_fext | grep -vf $ignore_paths > $find_results else if [ -z "$setmodsec" ]; then eout "{scan} building file list for $spath of new/modified files from last $days days, this might take awhile..." 1 fi $find $spath $tmpdir_paths -maxdepth $maxdepth -type f -mtime -$days -size +${minfilesize}c -size -$maxfilesize $ignore_fext | grep -vf $ignore_paths > $find_results fi
我可以说,你可以使用相同的通配符,就像你通常在grep中一样。
不过,我已经在我的maldet版本上进行了testing,只有当我像这样指定它时,它才能正常工作:
/home/.*/homes/.*/Maildir
尝试在你的pathexpression式中使用点。