MailScanner 收發郵件掃描時報錯了....

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

MailScanner 收發郵件掃描時報錯了....

Oct 23 09:40:09 mail MailScanner: Virus and Content Scanning: Starting
Oct 23 09:40:10 mail MailScanner: ERROR: Unable to open file or directory
Oct 23 09:40:11 mail MailScanner: Requeue: 071D216006C.34DDC to 6EA7416007E
Oct 23 09:40:11 mail MailScanner: Uninfected: Delivered 1 messages


:shock:

就這麼點信息...查不到哪有問題了...用的clamav
《解決方案》

你在mailscanner起用了殺毒軟體, clamav?  起用了還要告訴mailscanner clamav裝在哪, 病毒庫在哪, 調用clamav時clamav的執行文件在哪。。。。
《解決方案》

原帖由 戀夏寒 於 2007-11-1 16:45 發表 http://bbs.chinaunix.net/images/common/back.gif
你在mailscanner起用了殺毒軟體, clamav?  起用了還要告訴mailscanner clamav裝在哪, 病毒庫在哪, 調用clamav時clamav的執行文件在哪。。。。
對,,這些都要在MailScanner.conf里指定,,,

但我好像都有設定的.

:shock:
《解決方案》

# cd /var/clamav
# ls
daily.inc  main.cvd  mirrors.dat
# # cat clamd.log
Wed Oct 31 17:54:45 2007 -> +++ Started at Wed Oct 31 17:54:45 2007
Wed Oct 31 17:54:45 2007 -> clamd daemon 0.91.2 (OS: linux-gnu, ARCH: i386, CPU: i386)
Wed Oct 31 17:54:45 2007 -> Log file size limit disabled.
Wed Oct 31 17:54:45 2007 -> Reading databases from /var/clamav
Wed Oct 31 17:54:45 2007 -> Not loading PUA signatures.
Wed Oct 31 17:54:45 2007 -> ERROR: Unable to open file or directory
Wed Oct 31 18:23:17 2007 -> +++ Started at Wed Oct 31 18:23:17 2007
Wed Oct 31 18:23:17 2007 -> clamd daemon 0.91.2 (OS: linux-gnu, ARCH: i386, CPU: i386)
Wed Oct 31 18:23:17 2007 -> Log file size limit disabled.
Wed Oct 31 18:23:17 2007 -> Reading databases from /var/clamav
Wed Oct 31 18:23:17 2007 -> Not loading PUA signatures.
Wed Oct 31 18:23:17 2007 -> ERROR: Unable to open file or directory
-bash: [root@mail:

真的很奇怪...clamd.log 里也有同樣的報錯....只是不知道到底是少了個什麼東西.

[ 本帖最後由 Intranet 於 2007-11-1 17:59 編輯 ]
《解決方案》

原帖由 戀夏寒 於 2007-11-1 16:45 發表 http://bbs.chinaunix.net/images/common/back.gif
你在mailscanner起用了殺毒軟體, clamav?  起用了還要告訴mailscanner clamav裝在哪, 病毒庫在哪, 調用clamav時clamav的執行文件在哪。。。。



# cat virus.scanners.conf
# This is a list of the names of the virus scanning engines, along with the
# filename of the command or script to run to invoke each one.
# Three fields:
#  1.  Name of virus scanner as known by MailScanner. Do not change this.
#  2.  Location of -wrapper script. You should not need to change this.
#  3.  Installation directory of virus scanner. This does not usually include
#      any "bin" directory in the path to the scanner program itself.
# You can test a -wrapper script with a command like this:
#      /usr/lib/MailScanner/f-secure-wrapper /opt/f-secure/fsav /tmp
# That command will attempt to scan /tmp using F-Secure. If it works you
# should see some sensible output. If it fails, you will probably just see
# an error message such as "Command not found" or similar.
#
antivir         /usr/lib/MailScanner/antivir-wrapper    /usr/lib/AntiVir
avast           /usr/lib/MailScanner/avast-wrapper      /usr
avastd          /usr/lib/MailScanner/avastd-wrapper     /usr
avg             /usr/lib/MailScanner/avg-wrapper        /usr/local
bitdefender     /usr/lib/MailScanner/bitdefender-wrapper /opt/bdc
clamav          /usr/lib/MailScanner/clamav-wrapper     /usr/local
clamd           /bin/false                              /usr/local
clamavmodule    /bin/false                              /tmp
command         /usr/lib/MailScanner/command-wrapper    /usr
css             /usr/lib/MailScanner/css-wrapper        /opt/SYMCScan
drweb           /usr/lib/MailScanner/drweb-wrapper      /opt/drweb
etrust          /usr/lib/MailScanner/etrust-wrapper     /opt/eTrustAntivirus
f-prot          /usr/lib/MailScanner/f-prot-wrapper     /usr/local/f-prot
f-prot-6        /usr/lib/MailScanner/f-prot-6-wrapper   /opt/f-prot
f-secure        /usr/lib/MailScanner/f-secure-wrapper   /opt/f-secure/fsav
generic         /usr/lib/MailScanner/generic-wrapper    /
inoculan        /usr/lib/MailScanner/inoculan-wrapper   /usr/local/inoculan
inoculate       /usr/lib/MailScanner/inoculate-wrapper  /usr/local/av
# Kaspersky 5.5: your kaspersky-4.5 path should be /opt/kav/5.5
# Kaspersky 4.5 and newer
kaspersky-4.5   /usr/lib/MailScanner/kaspersky-wrapper  /opt/kav
kaspersky       /usr/lib/MailScanner/kaspersky-wrapper  /opt/AVP
kavdaemonclient /usr/lib/MailScanner/kavdaemonclient-wrapper /usr/local
mcafee          /usr/lib/MailScanner/mcafee-wrapper     /usr/local/uvscan
# Now updated to handle nod32 2.01 and upwards
#nod32-1.99     /usr/lib/MailScanner/nod32-wrapper      /usr/local/nod32
nod32-1.99      /usr/lib/MailScanner/nod32-wrapper      /usr/sbin
nod32           /usr/lib/MailScanner/nod32-wrapper      /usr/local/nod32
none            /bin/false                              /tmp
norman          /usr/lib/MailScanner/norman-wrapper     /usr/bin
panda           /usr/lib/MailScanner/panda-wrapper      /usr
rav             /usr/lib/MailScanner/rav-wrapper        /usr/local/rav8
sophos          /usr/lib/MailScanner/sophos-wrapper     /opt/sophos-av
sophossavi      /bin/false                              /tmp
symscanengine   /usr/lib/MailScanner/symscanengine-wrapper /opt/SYMCScan
trend           /usr/lib/MailScanner/trend-wrapper      /pack/trend
vexira          /usr/lib/MailScanner/vexira-wrapper     /usr/local/vexira
#



紅色部分應當就是對clamav的設定吧...沒有錯啊..

[ 本帖最後由 Intranet 於 2007-11-1 17:59 編輯 ]
《解決方案》

有沒有建立clamav的用戶啊?
《解決方案》

原帖由 Intranet 於 2007-11-1 17:56 發表 http://bbs.chinaunix.net/images/common/back.gif




# cat virus.scanners.conf
# This is a list of the names of the virus scanning engines, along with the
# filename of the command or script to run to invoke each on ...


你是怎麼安裝clamav的? tar包?

以下是我以前安裝clamav的過程

4.        安裝ClamAV
# cd /usr/local/src
# tar -zxvf clamav-0.88.5.tar.gz
# cd clamav-0.88.5
# groupadd clamav
# useradd –g clamav –s /bin/false clamav
# ./config --prefix=/usr/local/clamav --disable-clamav --enable-milter
# make&&make install
安裝完后修改clamd.conf和freshclam.conf兩個配置文件
# vi /usr/local/clamav/etc/clamd.conf
把Example用#註釋掉,然後修改以下內容
DatabaseDirectory  /usr/local/clamav/share/clamav
LocalSocket   /tmp/clamd
User  clamav
ScanMail  yes
ScanArchive yes
保存退出
# vi /usr/local/clamav/etc/freshclam.conf
把Example用#註釋掉,然後修改以下內容
DatabaseDirectory  /usr/local/clamav/share/clamav
UpdateLogFile  /var/log/freshclam.log
保存退出
# touch /var/log/freshclam.log
# chmod 600 /var/log/freshclam.log
# chown clamav /var/log/freshclam.log
# vi /etc/logrotate.d/syslog
把/var/log/freshclam.log加入syslog里
運行freshclam –v看是否可以更新病毒
# /usr/local/clamav/bin/freshclam –v
利用crontab進行自動更新(每天早上6點更新一次)
# crontab -e
* 6 * * * /usr/local/clamav/bin/freshclam

以下是把clamav整合到mailscanner需要修改的文件
# vi /etc/MailScanner/MailScanner.conf
Monitors for ClamAV Updates = /usr/local/clamav/share/clamav/*.cvd
# vi /etc/MailScanner/virus.scanners.conf
clamav          /usr/lib/MailScanner/clamav-wrapper     /usr/local/clamav
# vi /usr/lib/MailScanner/clamav-autoupdate
$PackageDir = shift || "/usr/local/clamav"
《解決方案》


感謝  戀夏寒  關注


你是怎麼安裝clamav的? tar包?

我用
yum -y install clamd 
在線安裝的,在centos 5上.

我再看看你貼的配置信息.
我也覺得應當是配置文件有誤.

:P
《解決方案》

原帖由 戀夏寒 於 2007-11-2 16:00 發表 http://bbs.chinaunix.net/images/common/back.gif
有沒有建立clamav的用戶啊?


我好像沒有建立clamav這個步驟,是必須的嗎?
thx.




[火星人 ] MailScanner 收發郵件掃描時報錯了....已經有684次圍觀

http://coctec.com/docs/service/show-post-34485.html