postfix spamassassin 傳輸外部系統

postfix spamassassin 傳輸外部系統

在郵件系統上本地運行 spamassassin 會導致負載問題。在另一個使用 Exim 作為 MTA 將郵件傳送到一系列外部 spamassassin 系統的系統上,只需更改配置中的一行即可對它們進行循環查詢。

現在,在新的 postfix 設定中,垃圾郵件掃描的傳輸在 /etc/postfix/master.cf 中如下所示:

smtpd pass - - - - 200 smtpd -o content_filter=spamassassin

/etc/postfix/master.cf 中 spamassassin 的定義是:

spamassassin unix - n n - - pipe user=debian-spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

我想減輕這個系統的負擔,但似乎找不到任何專門用於外部 spamassassin 的後綴傳輸的文檔。我最接近的是我在 postfix 文件中找到的東西 http://www.postfix.org/FILTER_README.html在高級內容過濾器範例下,這使我嘗試將傳輸線編輯為:

smtpd pass - - - - 200 smtpd -o content_filter=scan:<ExternalIP>:<ExternalPort>

然而,這導致運輸不可用。

答案1

spamassassin unix  -       n       n       -       -       pipe
  user=debian-spamd argv=/usr/bin/spamc -d <external_host1>,<external_host2>,<external_host3> -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

儘管這不是循環法,只是故障轉移,但這是有效的。

man spamc

Configuration File

The above command-line switches can also be loaded from a configuration file.

The format of the file is similar to the SpamAssassin rules files; blank lines and lines beginning with "#" are ignored. Any space-separated words are considered additions to the command line, and are prepended. Newlines are treated as equivalent to spaces. Existing command line switches will override any settings in the configuration file.

If the -F switch is specified, that file will be used. Otherwise, "spamc" will attempt to load spamc.conf in "SYSCONFDIR" (default: /etc/mail/spamassassin). If that file doesn't exist, and the -F switch is not specified, no configuration file will be read.

Example:

# spamc global configuration file

# connect to "server.example.com", port 783
-d server.example.com
-p 783

是一件事。

相關內容