FEATURE(ratecontrol)

Limit the rate at which other MTAs may connect to yours V8.13 and later

This FEATURE(ratecontrol) allows you to use the access database to control the rate at which other machines can connect to your server.[244] The rate is based on the setting of the ConnectionRateWindowSize option (ConnectionRateWindowSize on page 989), which defaults to 60 seconds. So, for example, it you want to reject more than 10 connections per minute (60 seconds) from the IP address 192.168.23.45, you would put the following into your access database source file:

ClientRate:192.168.23.45     10

Here, if the host with the IP address 192.168.23.45 connects to your server more than 10 times in a given 60 seconds (the default window of time), the 11th and subsequent connections during that interval will be rejected.

You enable the FEATURE(ratecontrol) like this:

FEATURE(`ratecontrol')

But note, if you have not already declared the access database (The access Database on page 277), you must do so before declaring this new feature, or you will get the following error when building your new configuration file:

*** ERROR: FEATURE(ratecontrol) requires FEATURE(access_db)

Once you have successfully enabled this FEATURE(ratecontrol), you may use it to control the connection rate by the IP addresses of hosts or networks, or to set the default limit:

ClientRate:192.168.23.45                             2
ClientRate:127.0.0.1                                 0
ClientRate:                                          10
ClientRate:10.5.2                                    2
ClientRate:IPv6:2002:c0a8:51d2::23f4                 5

Here, the first line (as you have seen) ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.