qmail-scanner でエラー

ちょっと前から、qmail-scanner でエラーが出るようになった。

 1212501790.075943 X-Qmail-Scanner-1.21:[hogehoge121250179047017405] clamdscan: corrupt 
or unknown clamd scanner error or memory/resource/perms problem - exit status 2

ぐぐって見るけど、有効な情報は見つからなかった。でも、/var/spool/qmailscan/qmail-queue.log をみると何か情報が得られるかも知れないと書いてあったので見てみた。
すると、エラーの原因がログに出ていた。

Wed, 04 Jun 2008 23:43:01 +0900:28303: run /usr/bin/clamdscan -r --disable-summary 
--max-recursion=10 --max-space=1000000  /var/spool/qmailscan/tmp/
hogehoge121259058147028303 2>&1
Wed, 04 Jun 2008 23:43:01 +0900:28303: --output of clamdscan was:
WARNING: Ignoring option --recursive (-r)
WARNING: Ignoring option --max-recursion
/usr/bin/clamdscan: unrecognized option `--max-space=1000000'
ERROR: Can't parse the command line
ERROR: Unknown option passed.
--

なにやら、clamdscan のコマンドラインオプション「--max-space」が間違っていると言っているようだ。man で確かめると確かにない。


そういえば、この前 clamav をアップグレードしたのでコマンドラインオプションが変わったのかもしれないと思い、README を見てみると案の定以下のように書いてあった。

  * clamscan:
    - NEW CMDLINE OPTIONS: --max-filesize, --max-scansize
    - REMOVED OPTIONS: --block-max, --max-space, --max-ratio

やはり「--max-space」はなくなっていた。代わりに「--max-scansize」を使えばいいようなので、qmail-scanner-queue.pl 内のコマンドラインオプションを書き換え、contrib/test-instration.sh を実行すると、無事にエラーにならず動いた。


コマンドラインオプションが変わった理由は、DOSアタックに対する対策のためらしい。