postfix spamassassin トランスポート 外部システム

postfix spamassassin トランスポート 外部システム

メール システムでローカルに spamassassin を実行すると、負荷の問題が発生します。Exim を MTA として使用して、外部の spamassassin システムの配列にメールを送信する別のシステムでは、構成を 1 行変更するだけで、ラウンドロビンでクエリが実行されました。

新しい 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

物です。

関連情報