policyd-rate-limit(8)
π NAME π
okay so bestie, meet policyd-rate-limit β she's a rate limiter SMTP policy daemon and she is literally the moment. π
β¨ SYNOPSIS β¨
policyd-rate-limit [-h] [--clean] [--get-config configname] [--file
configpath]
π¦ DESCRIPTION π¦
policyd-rate-limit(8) is an SMTP policy daemon written in python3(1) for postfix(1). No cap. π
She keeps track of how many mails each sasl username and/or ip address has sent, over a time sliding window. And then β the way that she will notice β once a user and/or ip address exceeds one or more configurable limits, a configurable action gets done (peep access(5) for that action tea). periodt.
πΈ SETUP πΈ
so like, for postfix 3.0 and later, you can set this in your postfix /etc/postfix/main.cf configuration file:
smtpd_data_restrictions =
...,
check_policy_service { unix:ratelimit/policy, default_action=DUNNO },
...
Postfix will ask policyd-rate-limit what to do on mail reception (that's the success or fail action bestie) and β iconic behaviour β it will accept the mail if policyd-rate-limit becomes unavailable. π«Ά
On previous postfix versions, you must use:
smtpd_data_restrictions =
...,
check_policy_service unix:ratelimit/policy,
...
π OPTIONS π
-h,--helpβ show this help message and exit. slay, she's helpful β¨--cleanβ clean old records from the database π§Ή--get-config confignameβ return the value of the configname configuration parameter. You can get a value in a dictionary by using a dotted notation. For instance, for getting the keyKEYin the dictionaryDICT, you should useDICT.KEYfor configname. You can call the configuration parameterconfig_fileto know which configuration file is used. π-f,--fileβ path to apolicyd-rate-limitconfiguration file π
π LOGGING π
Logging is output to stderr and redirected to syslog(3) by systemd. Logs are produced only if the debug configuration parameter is set to True. no debug, no gossip π
π CONFIGURATION π
If the option --file is not specified, policyd-rate-limit(8) tries to read its configuration from the following path and chooses the first existing file:
~/.config/policyd-rate-limit.conf
~/.config/policyd-rate-limit.yaml
/etc/policyd-rate-limit.conf
/etc/policyd-rate-limit.yaml
The .conf are the old configuration format. It was a python module and should not be used. π The .yaml are the new configuration format using the YAML syntax. See YAML(3pm) for an overview of the format. See policyd-rate-limit.yaml(5) for possible settings, bestie, go read it. π
β EXIT VALUES β
0β Normal exit. π₯°1β Only return then the option--get-configis used. Configuration parameter not found. π2β User or group set in the configuration file do not exists.3β Another instance is already running. bestie she's already there π4β The configuration parameterSOCKETis malformed.5β Configuration file not found.6β Some error was raised during runtime.8β Error during cleaning.
π₯ SEE ALSO π₯
policyd-rate-limit.yaml(5):policyd-rate-limitconfiguration filemaster(5), Postfixmaster.cffile syntaxaccess(5), Postfix SMTP access control table
π AUTHOR π
Valentin Samir <valentin.samir@crans.org>
title_upper: policyd-rate-limit
π COPYRIGHT π
GPL-3
okay that's the whole thing bestie, you ate. and for the record, this little beauty is version 3.8, dated 2016-08-04, and she answers to policyd-rate-limit(8) π¦β¨π
π¦ where this page comes from
- ubuntu resolute: policyd-rate-limit 1.2.0-2 Β· GPL-3.0-only
- ubuntu stonking: policyd-rate-limit 1.2.0-6 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms