這個範例對所有郵件進行垃圾郵件和病毒篩選,這些郵件從 MTA 轉送至稱為 msg_store1.siroe.com 的後端郵件儲存
在 imta.cnf 檔案 (負責將郵件傳送至後端郵件儲存主機) 中,增加一個重寫規則。範例:
msg_store1.siroe.com $U@msg_store1.siroe.com
透過 destinationspamfilterXoptin 關鍵字增加對應該重寫規則的通道。範例:
tcp_msg_store1 smtp subdirs 20 backoff "pt5m" "pt10" "pt30" "pt1h" \ "pt2h" "pt4h" maxjobs 1 pool IMS_POOL fileinto $U+$S@$D \ destinationspamfilter 1optin spam,virus msg_store1.siroe.com
範例 2 對經由 MTA 的所有內送郵件 (通常,所有內送的郵件都經由 tcp_local 通道) 進行垃圾郵件篩選:
tcp_local smtp mx single_sys remotehost inner switchchannel \ identnonelimited subdirs 20 maxjobs 7 pool SMTP_POOL \ maytlsserver maysaslserver saslswitchchannel tcp_auth \ sourcespamfilter1optin spam tcp-daemon
範例 3 對經由 MTA 外寄至網際網路的所有郵件進行篩選。(通常,所有外寄至網際網路的郵件都經由 tcp_local 通道。)
tcp_local smtp mx single_sys remotehost inner switchchannel \ identnonelimited subdirs 20 maxjobs 7 pool SMTP_POOL \ maytlsserver maysaslserver saslswitchchannel tcp_auth \ destinationspamfilter1optin spam tcp-daemon
範例 4 對經由 MTA 的所有內送和外寄郵件進行篩選:
tcp_local smtp mx single_sys remotehost inner switchchannel \ identnonelimited subdirs 20 maxjobs 7 pool SMTP_POOL \ maytlsserver maysaslserver saslswitchchannel tcp_auth \ sourcespamfilter1optin spam destinationspamfilter1optin spam tcp-daemon
範例 5 在兩層系統中篩選目標為本機郵件儲存的所有郵件,而不使用使用者 optin:
ims-ms smtp mx single_sys remotehost inner switchchannel \ identnonelimited subdirs 20 maxjobs 7 pool SMTP_POOL \ maytlsserver maysaslserver saslswitchchannel tcp_auth \ destinationspamfilter1optin spam tcp-daemon
範例 6 對所有內送和外寄的郵件進行垃圾郵件和病毒篩選 (假定您的軟體對垃圾郵件和病毒均可進行篩選):
tcp_local smtp mx single_sys remotehost inner switchchannel \ identnonelimited subdirs 20 maxjobs 7 pool SMTP_POOL \ maytlsserver maysaslserver saslswitchchannel tcp_auth \ destinationspamfilter1optin spam,virus sourcespamfilter1optin \ spam,virus tcp-daemon