${client_rate}
Rate of client connections V8.13 and later
When a host connects to the listening sendmail server, the
server forks a child to handle the new connection.
Before forking, the server increments the count of
total inbound connections from that particular
client identified by its IP address. The rate of
those connections is then updated inside a specific
window of time (defined by the ConnectionRateWindowSize
option; ConnectionRateWindowSize
on page 989), which defaults to 60 seconds.
Beginning with V8.13 sendmail, the ${client_rate}
macro holds that count
as its value, making it available to use in rule
sets.
Also beginning with V8.13, if you declare FEATURE(ratecontrol)
(FEATURE(ratecontrol) on page 638), a rule set called RateControl
will be
added to your configuration file that looks up the
current IP address in the access database. The source text file
for the access database may
contain that address with a literal ClientRate:
prefix, as,
for example:
ClientRate:123.45.67.89 4
Note that the literal prefix is followed by the IP address to be looked up, then tabs or spaces,[317] and lastly by the limit to impose for the maximum connection rate for that IP address.
If the current rate (as stored in this ${client_rate}
macro)
exceeds the limit imposed inside the
access database, the new
connection is rejected with the following
error:
433 4.3.0 Connection rate limit exceeded.
If you are interested in knowing the total rate of
connections for all clients, see the ${total_rate} ...
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.