aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-09-11 12:16:53 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-09-11 12:16:53 +0000
commit0434e04c026bc4014a59eb7b9af5611a0df5fc9e (patch)
treec0ef6e191c3b98c25c0412ddb979627988a54ec6 /doc
parenta5e06ce6cbbc41a806857055bb689bdce4d39b57 (diff)
downloadmailfromd-0434e04c026bc4014a59eb7b9af5611a0df5fc9e.tar.gz
mailfromd-0434e04c026bc4014a59eb7b9af5611a0df5fc9e.tar.bz2
* src/mu_dbm.c [WITH_GDBM] (mu_dbm_firstkey,mu_dbm_nextkey):
Return MU_ERR_NOENT instead of MU_ERR_FAILURE. * src/mailfromd.h (get_rate): New argument mincount * src/rate.c: Likewise * src/bi_other.m4 (rate): Optional argument mincnt * src/mtasim.c: Accept MAIL FROM: and RCPT TO: without extra space after `:'. * doc/mailfromd.texi, NEWS: Update git-svn-id: file:///svnroot/mailfromd/trunk@1509 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'doc')
-rw-r--r--doc/mailfromd.texi24
1 files changed, 20 insertions, 4 deletions
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi
index 1043082f..078f722a 100644
--- a/doc/mailfromd.texi
+++ b/doc/mailfromd.texi
@@ -2198,10 +2198,24 @@ this function, the function invocation would be:
rate($f "-" $@{client_addr@}, interval("1 hour"))
@end smallexample
- For more information about @code{rate} function, see @ref{rate}. The
-@code{interval} function is described in @ref{interval} and time
+ The @code{interval} function is described in @ref{interval}, and time
intervals are discussed in @ref{time interval specification}.
+ The @code{rate} function begins returning non-zero value as soon as
+it has enough data to compute the rate. By default, it needs at least
+two mails. Since this may lead to a big number of false positives
+(i.e. overestimated rates) at the beginning of sampling interval,
+there is a way to specify a minimum number of samples @code{rate} must
+collect before starting to actually compute rates. This number of
+samples is given as the optional third argument to the function. For
+example, the following call will return 0 unless at least 10 mails
+with the given key value were detected:
+
+@smallexample
+ rate($f "-" $@{client_addr@}, interval("1 hour"), 10)
+@end smallexample
+
+For additional information about @code{rate} function, see @ref{rate}.
@node Greylisting
@section Greylisting
@@ -6581,10 +6595,12 @@ explanation.
@anchor{rate}
@deftypefn {Built-in Function} number rate (string @var{key}, @
- number @var{sample-interval})
+ number @var{sample-interval}, [number @var{threshold}])
Returns the mail sending rate for @var{key} per
-@var{sample-interval}. @xref{Sending Rate}, for a detailed
+@var{sample-interval}. Optional @var{threshold}, if supplied,
+specifies the minimal number of mails needed to obtain the
+statistics. The default is 2. @xref{Sending Rate}, for a detailed
discussion.
@end deftypefn

Return to:

Send suggestions and report system problems to the System administrator.