在整合完postfix+MailScanner+Clam AV+F-prot+openwebmal+procmail+My Spam之後,在觀察maillog之後,會看到下面這些訊息。
重點在於一行 ClamAV updater /usr/local/bin/freshclam cannot be run
怎麼回事,用MailScanner帶起Clam AV之後卻無法順利的更新病毒資料庫
其實這個問題之前就有發生了,只是我把freshclam的指令寫在cron table中
Mar 6 13:01:02 dns update.bad.phishing.sites: Delaying cron job up to 600 seconds
Mar 6 13:01:41 dns update.virus.scanners: Delaying cron job up to 600 seconds
Mar 6 13:04:22 dns update.virus.scanners: Found clamav installed
Mar 6 13:04:22 dns update.virus.scanners: Running autoupdate for clamav
Mar 6 13:04:22 dns ClamAV-autoupdate[476]: ClamAV updater /usr/local/bin/freshclam cannot be run
這次實際檢查之後,我知道為什麼了
因為/usr/local/bin中,並沒有freshclam指令,而指令在/usr/bin中
我在想可能是因為MailScanner編譯的關係,不同的平台(UNIX/FreeBSD)
存放路徑不同的關係
那我們就來產生一下指令的連結好了
請執行下面這些指令
cd /usr/local/bin
ln -s /usr/bin/freshclam freshclam
ll
lrwxrwxrwx 1 root root 27 Oct 11 2008 f-prot -> /usr/local/f-prot/f-prot.sh
lrwxrwxrwx 1 root root 19 Mar 4 11:12 fpscan -> /root/f-prot/fpscan
lrwxrwxrwx 1 root root 18 Mar 6 14:28 freshclam -> /usr/bin/freshclam
出現了f-prot和freshclam的指令,看來f-prot有自動把連結產生好
再來觀察maillog中的訊息囉!
Mar 6 20:10:33 dns dovecot: POP3(superuser): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Mar 6 20:15:35 dns dovecot: pop3-login: Login: user=<superuser>, method=PLAIN, rip=::ffff:124.11.215.182, lip=::ffff:60.251.247.5
Mar 6 20:15:35 dns dovecot: POP3(superuser): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Mar 6 20:17:28 dns update.virus.scanners: Found clamav installed
Mar 6 20:17:28 dns update.virus.scanners: Running autoupdate for clamav
Mar 6 20:17:29 dns ClamAV-autoupdate[6152]: ClamAV did not need updating
Mar 6 20:17:29 dns update.virus.scanners: Found generic installed
Mar 6 20:17:29 dns update.virus.scanners: Running autoupdate for generic
出現了不必更新的訊息,表示更新動作有正確的執行,所以囉!這樣修改是成功的
隨機文章
- 信義房屋的美女菜鳥廣告 (2013-03-29)
- 雷軍:手機進入大淘汰 紅米2只有1G RAM? (2015-01-07)
- 謝長廷發表168一路發青年住屋政策 (2008-01-08)
- #1071 – Specified key was too long; max key length is 1000 bytes (2012-01-06)
- OLPC-廣達否認百元筆記本延遲 江蘇工廠已經量產 (2007-11-04)



![[chatGPT 測試] 評測開箱 Synology DS918+](https://chihping.aflypen.com/wp-content/uploads/2023/03/hdd-g6fc6f0659_640-300x228.png)




