Postfix で "statistics: max connection rate n/60s for (smtp:nnn.nnn.nnn.nnn)" メッセージがログに表示される - Postfix

Postfix で "statistics: max connection rate n/60s for (smtp:nnn.nnn.nnn.nnn)" メッセージがログに表示される場合の対処法です。

現象

/var/log/maillog に
(ホスト名) postfix/anvil[4911]: statistics: max connection rate 1/60s for (smtp:5.159.54.16) at (日時)
が記録されます。

合わせて
(ホスト名) postfix/anvil[4911]: statistics: max connection count 1 for (smtp:5.159.54.16) at (日時)
(ホスト名) postfix/anvil[4911]: statistics: max cache size 1 at (日時)
のメッセージが記録されることもあります。

ログの例

Apr  3 03:59:27 post postfix/anvil[56546]: statistics: max connection rate 1/60s for (smtp:115.29.192.43) at Apr  3 03:56:07
Apr  3 03:59:27 post postfix/anvil[56546]: statistics: max connection count 1 for (smtp:115.29.192.43) at Apr  3 03:56:07
Apr  3 03:59:27 post postfix/anvil[56546]: statistics: max cache size 1 at Apr  3 03:56:07

原因

一定時間内に同一クライアントから接続できる回数を上回っています。

対策1:接続上限数を緩和する

/etc/postfix/main.cf ファイルの smtpd_client_connection_rate_limit に大きな値を設定します。

または、anvil_rate_time_unit の時間を短くします。
(デフォルトは smtpd_client_message_rate_limit = 60s なので、smtpd_client_message_rate_limit = 10s などに変更)

補足1

改善されない場合は、同時接続数の上限設定 smtpd_client_connection_count_limit の値を見直します。

補足2

メールが送信できない場合は、 smtpd_client_message_rate_limit の値も見直します。

対策2:接続元のネットワークを制限対象から外す

/etc/postfix/main.cf ファイルに
smtpd_client_event_limit_exceptions = nnn.nnn.nnn.nnn
(nnn.nnn.nnn.nnn)は接続元のIPアドレスを入力します。
上記を記載し、制限対象から除外します。
著者
かつて日本を代表したスーパーエンジニア (自称)
ハードウェア、電気設備、ガーデニング関係の記事を担当。
最終更新日: 2024-01-06
作成日: 2016-04-06
iPentec all rights reserverd.