RATEFILTER(8)

πŸ“¦
version 2.0.6 Β· 3 versions
, in ubuntu stonking

🌸 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 β€” when ratefilter is 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", ratefilter creates its listening socket in /var/lib/courier/allfilters, otherwise the socket gets created in /var/lib/courier/filters. See courierfilter(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 ⭐

  1. courierfilter(8) https://www.courier-mta.org/courierfilter.html
  2. courier(8) https://www.courier-mta.org/courier.html
  3. sendmail(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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms