Postfix limit incoming or receiving email rate

‮ttual.www‬uri.com
Postfix limit incoming or receiving email rate

To limit the rate at which a Postfix mail server processes incoming mail, you can use the anvil service and the smtpd_client_connection_rate_limit parameter in the main.cf configuration file.

The anvil service is a Postfix service that tracks the number of connections and commands received by the server, and can be used to limit the rate at which the server processes incoming mail.

To enable the anvil service and limit the rate at which the server processes incoming mail, follow these steps:

  1. Add the following line to the main.cf configuration file:
service anvil {
  unix_listener anvil {
    group = postfix
    mode = 0660
    user = postfix
  }
  inet_listener anvil {
    group = postfix
    mode = 0660
    user = postfix
  }
}
  1. Add the smtpd_client_connection_rate_limit parameter to the main.cf configuration file to specify the maximum number of connections that the server will accept from a single client IP address in a given time period:
smtpd_client_connection_rate_limit = value

The value can be set to a number of connections, followed by the time period. For example, smtpd_client_connection_rate_limit = 20/1h will limit the rate to 20 connections per hour.

  1. Restart the Postfix service to apply the changes.

It's important to note that this is just one example of how to limit the rate at which a Postfix mail server processes incoming mail. There are many other parameters and settings that you can configure to customize the behavior of the server. Consult the Postfix documentation and online resources for more information on how to limit the rate of incoming mail on a Postfix mail server.

Created Time:2017-10-30 14:27:11  Author:lautturi