RATEFILTER(8)
πΈ NAME πΈ
ratefilter β the rate-limiting mail filter, aka the bouncer at the door of your mail server π
β¨ SYNOPSIS β¨
filterctl {[start] | [stop]} ratefilter
π DESCRIPTION π
Okay bestie, turn this filter on and it enforces a maximum number of messages accepted from the same sender. That's it, that's the gig. One sender trying to spam-flood your queue? Not on this filter's watch. π«Ά
ratefilter reads the following configuration files. Heads up though: changes to these files do not take effect until the filter has been stopped and restarted. So stop it, start it, then it's giving new settings. No cap.
/etc/courier/filters/ratefilter-intervalβ this file holds a single numerical value that sets the rate limiting time interval setting, in seconds. Default is sixty seconds. And plot twist: sixty seconds is also the minimum acceptable interval. So don't try to go lower, it said what it said. β/etc/courier/filters/ratefilter-maxrcptsβ this one holds a single numerical value that sets how many recipients the same sender can send mail to, within the controlling time interval. Default is 100 recipients. That's the budget, bestie, spend it wisely. π/etc/courier/filters/ratefilter-minuidβ whenratefilteris enabled for locally originating mail, this sets the minimum system userid that has rate limiting enforced. Default value is 100. Mail sent by processes with lower uids are not subject to rate limiting. So the tiny uids get a pass, iconic behavior honestly. π/etc/courier/filters/ratefilter-modeβ if this file exists and contains the word"all",ratefiltercreates its listening socket in/var/lib/courier/allfilters, otherwise the socket gets created in/var/lib/courier/filters. Seecourierfilter(8)[1] for more information. Location, location, location π
The enablefiltering setting controls whether local or ESMTP mail is subject to rate limiting β see courier(8)[2] for more information.
In this context, βlocalβ mail refers to mail that gets sent when a process executes the sendmail(1)[3] command. This does not include mail sent via a connection to local port 25 β nope, that one is considered ESMTP mail. Different lane, different vibe. π¦
Local mail gets rate limited based on the sending process's userid. Each numerical userid gets treated as an individual sender. ESMTP mail's sender is taken from the authenticated ESMTP's userid. Non-authenticated ESMTP mail is not subject to rate limiting. Sorry to the anon senders, no rate limit for you π
Rate limiting is implemented by dividing chronological time into intervals that are half the time interval given in the ratefilter-interval setting. For example, with the default interval of sixty seconds, chronological time gets divided into thirty second intervals. Math ate, fr fr. β¨
ratefilter counts the number of recipients in each message (and not just the number of messages) from each sender, in each time interval. Recipients, bestie. Every single one counts. π
ratefilter rejects the message when the total number of recipients from all messages from the same sender in the current and the previous time interval exceeds the ratefilter-maxrcpts setting. And the rejected message's number of recipients also get counted, for the purpose of rejecting future messages. So rejection isn't a free pass, it's still on your record. The way that it just keeps counting? Obsessed. π₯
π SEE ALSO π
courierfilter(8)[1].
π AUTHOR π
Sam Varshavchik Author
β NOTES β
courierfilter(8)https://www.courier-mta.org/courierfilter.htmlcourier(8)https://www.courier-mta.org/courier.htmlsendmail(1)https://www.courier-mta.org/sendmail.html
And that's the whole page, bestie!! π This one's from the Courier Mail Server, dated 01/10/2026, and it's page RATEFILTER(8) β go forth and rate limit responsibly, mwah πβ¨
π¦ where this page comes from
- ubuntu stonking: courier-mta 2.0.6-1 Β· GPL-3+~with-OpenSSL-exception
- Copyright 2013 S. Varshavchik. See COPYING for -->
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms