Sun Java System Messaging Server 6.3 管理指南

Procedure使用 ClamAV 捨棄感染病毒或特洛伊木馬病毒的電子郵件

下列範例捨棄發現包含 ClamAV 偵測到的病毒或特洛伊木馬病毒之所有郵件。不使用判定結果字串。

  1. 建立 ClamAV 配置檔案。

    此檔案的名稱與位置指定於步驟 2 中。正確的名稱如 clamav.opt。此檔案包含以下行:


    # more /opt/SUNWmsgsr/config/clamav.opt
    ! ClamAV Settings
    debug=1
    host=127.0.0.1
    port=3310
    mode=1

    debug=1 開啟 ClamAV 程式庫中的除錯處理。

    hostport 指定執行 clamd 的系統名稱和 clamd 偵聽內送請求時所在的連接埠。

    mode=1 指定 ClamAV 外掛程式傳回 ClamAV 結果字串,做為偵測到電子郵件感染病毒時的判定結果。

  2. 修改 option.dat 檔案。

    將以下行增加至 option.dat 檔案:


    ! ClamAV settings 
    spamfilter2_config_file=/opt/SUNWmsgsr/config/clamav.opt 
    spamfilter2_library=/opt/SUNWmsgsr/lib/libclamav.so 
    spamfilter2_string_action=data:,require ["jettison"]; jettison;

    spamfilter2_config_file 指定 ClamAV 配置檔案。

    spamfilter2_library 指定 ClamAV 共用程式庫。

    spamfilter2_string_action 指定對感染病毒的電子郵件執行篩選動作。

  3. 指定要篩選的郵件。

    若要篩選進入本機郵件儲存的所有郵件,請將 destinationspamfilterXoptin 病毒關鍵字增加至 ims-ms 通道,以變更 imta.cnf 檔案:


    !
    ! ims-ms 
    ims-ms defragment subdirs 20 notices 1 7 14 21 28 backoff "pt5m" "pt10m"
    "pt30m" "pt1h" "pt2h" "pt4h" maxjobs 4 pool IMS_POOL fileinto 
    $U+$S@$D destinationspamfilter2optin virus 
    ims-ms-daemon
  4. 重新編譯配置並重新啟動伺服器。

    僅 MTA 需要重新啟動。無需執行 stop-msg。


     # imsimta cnbuild
    # imsimta restart
  5. 啟動 clamd 常駐程式。