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 传输的文档。我找到的最接近的文档是我在 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

是一个事物。

相关内容