aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-06-17 13:29:19 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-06-17 13:29:19 +0300
commit98622244518c1cf94784aa17390cb18c72a888c1 (patch)
tree31dbec2066f649d09533d0ac97f5341072e76b6e
parentf8f65c7e1713e516083bc2ced9794d2b648ad2de (diff)
downloadmailfromd-98622244518c1cf94784aa17390cb18c72a888c1.tar.gz
mailfromd-98622244518c1cf94784aa17390cb18c72a888c1.tar.bz2
Minor changes.
* configure.ac: Check for struct pmilter_S.pmfi_fdmax * doc/pmult.texi: Document new pmult configuration statements. * pmult/pmult.c: Make pmilter.pmfi_fdmax configurable.
-rw-r--r--configure.ac3
-rw-r--r--doc/pmult.texi19
-rw-r--r--pmult/pmult.c12
3 files changed, 33 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c0d902e3..e93cdbe9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -594,7 +594,8 @@ if test "$enable_pmilter" = yes; then
done
IU_CHECK_MEMBERS([struct pmilter_S.pmfi_thrmax_s,
- struct pmilter_S.pmfi_thrmax_h], , ,
+ struct pmilter_S.pmfi_thrmax_h,
+ struct pmilter_S.pmfi_fdmax], , ,
[#include "sm/error.h"
#include "sm/smreplycodes.h"
#include "sm/pmilter.h"
diff --git a/doc/pmult.texi b/doc/pmult.texi
index 42799e1c..afcff40f 100644
--- a/doc/pmult.texi
+++ b/doc/pmult.texi
@@ -94,6 +94,25 @@ can be enabled using the following statement:
Store PID of the @command{pmult} process in @var{file}.
@end deffn
+The following three limits require MeTA1 version @samp{PreAlpha30.0}
+or later.
+
+@deffn {Pmult Conf} max-threads-soft @var{n}
+``Soft'' limit on the number of @samp{pmilter} threads. Default is 2.
+@end deffn
+
+@deffn {Pmult Conf} max-threads-hard @var{n}
+``Hard'' limit on the number of @samp{pmilter} threads. This is
+roughly equivalent to the number of emails @command{pmult} is able
+to handle simultaneously. The default value is 6. Raise this limit
+if you experience long delays when connecting to the @acronym{SMTP} port.
+@end deffn
+
+@deffn {Pmult Conf} max-pmilter-fd @var{n}
+Maximum number of file descriptors @samp{pmilter} library is allowed
+to open simultaneously. Default is 10.
+@end deffn
+
@node pmult-macros
@subsection Translating MeTA1 macros.
@cindex macros, MeTA1
diff --git a/pmult/pmult.c b/pmult/pmult.c
index e9d7a720..252c1c47 100644
--- a/pmult/pmult.c
+++ b/pmult/pmult.c
@@ -56,6 +56,7 @@ int want_auth_macros; /* Pass auth_ macros to MAIL handler */
unsigned int max_threads_soft;
unsigned int max_threads_hard;
+unsigned int max_pmilter_fd;
struct pmult_client
{
@@ -715,6 +716,8 @@ struct mu_cfg_param pmult_cfg_param[] = {
N_("Maximum number of threads (soft limit)") },
{ "max-threads-hard", mu_cfg_uint, &max_threads_hard, 0, NULL,
N_("Maximum number of threads (hard limit)") },
+ { "max-pmilter-fd", mu_cfg_uint, &max_pmilter_fd, 0, NULL,
+ N_("Maximum number of file descriptors pmilter is allowed to open") },
{ "client", mu_cfg_section },
{ "debug", mu_cfg_callback, NULL, 0, _cb_debug,
N_("Set debug verbosity level.") },
@@ -2377,6 +2380,15 @@ main (int argc, char **argv)
mu_diag_output (MU_DIAG_WARNING, "Cannot set hard thread limit");
#endif
}
+
+ if (max_pmilter_fd)
+ {
+#if defined(HAVE_STRUCT_PMILTER_S_PMFI_FDMAX)
+ pmilter.pmfi_fdmax = max_pmilter_fd;
+#else
+ mu_diag_output (MU_DIAG_WARNING, "Cannot set fd limit");
+#endif
+ }
if (pidfile)
{

Return to:

Send suggestions and report system problems to the System administrator.