.\" Man page generated from reStructuredText. . .TH policyd-rate-limit 8 "2016-08-04" "3.8" "policyd-rate-limit" .SH NAME policyd-rate-limit \- rate limiter SMTP policy daemon . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBpolicyd\-rate\-limit\fP [\fB\-h\fP] [\fB\-\-clean\fP] [\fB\-\-get\-config\fP \fIconfigname\fP] [\fB\-\-file\fP \fIconfigpath\fP] .SH DESCRIPTION .sp \fBpolicyd\-rate\-limit\fP(8) is a SMTP policy daemon written in \fBpython3\fP(1) for \fBpostfix\fP(1). It keep track of the number of mails sent by sasl usernames and/or ip addresses over time sliding window. A configurable action (see \fBaccess\fP(5)) is done then a user and/or ip address exceeds one or more configurable limits. .SH SETUP .sp For example, for postfix 3.0 and later, you can set in postfix \fB/etc/postfix/main.cf\fP configuration file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C smtpd_recipient_restrictions = ..., check_policy_service { unix:ratelimit/policy, default_action=DUNNO }, ... .ft P .fi .UNINDENT .UNINDENT .sp Postfix will ask policyd\-rate\-limit what to do on mail reception (success or fail action) and will accept mail if policyd\-rate\-limit become unavailable. .sp On previous postfix versions, you must use: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C smtpd_recipient_restrictions = ..., check_policy_service unix:ratelimit/policy, ... .ft P .fi .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fB\-h\fP, \fB\-\-help\fP show this help message and exit .TP .B \fB\-\-clean\fP clean old records from the database .TP .B \fB\-\-get\-config\fP \fIconfigname\fP return the value of the \fIconfigname\fP 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 \fIconfigname\fP\&. You can call the configuration parameter \fIconfig_file\fP to known which configuration file is used. .TP .B \fB\-f\fP, \fB\-\-file\fP path to a policyd\-rate\-limit configuration file .UNINDENT .UNINDENT .UNINDENT .SH LOGGING .sp Logging is output to stderr and redirected to \fBsyslog\fP(3) by systemd. Logs are produced only if the \fBdebug\fP configuration parameter is set to True. .SH CONFIGURATION .sp If the option \fB\-\-file\fP is not specified, \fBpolicyd\-rate\-limit\fP(8) try to read its configuration from the following path and choose the first existing file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ~/.config/policyd\-rate\-limit.conf ~/.config/policyd\-rate\-limit.yaml /etc/policyd\-rate\-limit.conf /etc/policyd\-rate\-limit.yaml .ft P .fi .UNINDENT .UNINDENT .sp 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 \fBpolicyd\-rate\-limit.yaml\fP(5) for possible settings. .SH EXIT VALUES .INDENT 0.0 .INDENT 3.5 \fB0\fP Normal exit. .sp \fB1\fP Only return then the option \fB\-\-get\-config\fP is used. Configuration parameter not found. .sp \fB2\fP User or group set in the configuration file do not exists. .sp \fB3\fP Another instance is already running .sp \fB4\fP The configuration parameter SOCKET is malformed .sp \fB5\fP Configuration file not found .sp \fB6\fP Some error was raised during runtime .sp \fB8\fP Error during cleaning .UNINDENT .UNINDENT .SH SEE ALSO .nf \fBpolicyd\-rate\-limit.yaml\fP(5): policyd\-rate\-limit configuration file \fBmaster\fP(5), Postfix master.cf file syntax \fBaccess\fP(5), Postfix SMTP access control table .fi .sp .SH AUTHOR Valentin Samir .SH COPYRIGHT GPL-3 .\" Generated by docutils manpage writer. .