'\" t .\" .\" .\" Title: ratefilter .\" Author: Sam Varshavchik .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 10/28/2020 .\" Manual: Double Precision, Inc. .\" Source: Courier Mail Server .\" Language: English .\" .TH "RATEFILTER" "8" "10/28/2020" "Courier Mail Server" "Double Precision, Inc." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ratefilter \- Rate\-limiting mail filter .SH "SYNOPSIS" .HP \w'\fBfilterctl\fR\ 'u \fBfilterctl\fR {[start] | [stop]} ratefilter .SH "DESCRIPTION" .PP Enable this filter to enforce a maximum number of messages accepted from the same sender\&. .PP \fBratefilter\fR uses the following configuration files\&. Changes to the following files do not take effect until the filter has been stopped and restarted\&. .PP /etc/courier/filters/ratefilter\-interval .RS 4 This file contains a single numerical value that sets the rate limiting time interval setting, in seconds\&. The default value is sixty seconds\&. Sixty seconds is also the minimum acceptable interval\&. .RE .PP /etc/courier/filters/ratefilter\-maxrcpts .RS 4 This file contains a single numerical value that sets how many receipients the same sender can send mail to, within the controlling time interval\&. The default value is 100 recipients\&. .RE .PP /etc/courier/filters/ratefilter\-minuid .RS 4 When \fBratefilter\fR is enabled for locally originating mail, this sets the minimum system userid that has rate limiting enforced\&. The default value is 100\&. Mail sent by processes with lower uids are not subject to rate limiting\&. .RE .PP /etc/courier/filters/ratefilter\-mode .RS 4 If this file exists and contains the word "all", \fBratefilter\fR creates its listening socket in /var/lib/courier/allfilters, otherwise the socket gets created in /var/lib/courier/filters, see \m[blue]\fB\fBcourierfilter\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2 for more information\&. .RE .PP The enablefiltering settings controls whether local or ESMTP mail is subject to rate limiting, see \m[blue]\fB\fBcourier\fR(8)\fR\m[]\&\s-2\u[2]\d\s+2 for more information\&. .PP In this context, \(lqlocal\(rq mail refers to mail that gets sent when a process executes the \m[blue]\fB\fBsendmail\fR(1)\fR\m[]\&\s-2\u[3]\d\s+2 command\&. This does not include mail sent via connection to local port 25, this is considered ESMTP mail\&. .PP Local mail gets rate limited based on the sending process\*(Aqs userid\&. Each numerical userid gets treated as an individual sender\&. ESMTP mail\*(Aqs sender is taken from the authenticated ESMTP\*(Aqs userid\&. Non\-authenticated ESMTP mail is not subject to rate limiting\&. .PP 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\&. .PP \fBratefilter\fR counts the number of receipients in each message (and not just the number of messages) from each sender, in each time interval\&. .PP \fBratefilter\fR 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\&. The rejected message\*(Aqs number of recipients also get counted, for the purpose of rejecting future messages\&. .SH "SEE ALSO" .PP \m[blue]\fB\fBcourierfilter\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2\&. .SH "AUTHOR" .PP \fBSam Varshavchik\fR .RS 4 Author .RE .SH "NOTES" .IP " 1." 4 \fBcourierfilter\fR(8) .RS 4 \%http://www.courier-mta.org/courierfilter.html .RE .IP " 2." 4 \fBcourier\fR(8) .RS 4 \%http://www.courier-mta.org/courier.html .RE .IP " 3." 4 \fBsendmail\fR(1) .RS 4 \%http://www.courier-mta.org/sendmail.html .RE