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 key KEY in the dictionary DICT, you should use DICT.KEY for configname. You can call the configuration parameter config_file to know which configuration file is used. πŸ‘‘
  • -f, --file β€” path to a policyd-rate-limit configuration 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-config is 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 parameter SOCKET is malformed.
  • 5 β€” Configuration file not found.
  • 6 β€” Some error was raised during runtime.
  • 8 β€” Error during cleaning.

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Valentin Samir <valentin.samir@crans.org>

title_upper: policyd-rate-limit


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