Hello,
I noticed the smtp_accept_max_nonmail setting in Exim 4.12. Here is my
trivial patch for unrecognized commands for Exim 4.12. I recommend
a lower default value, e.g. 3.
I looked at the quote_ldap_dn function. It uses backslashs for quoting,
but I can not find the relation to RFC 1485 (A String Representation of
Distinguished Names). Is that RFC outdated?
Michael
----------------------------------------------------------------------
--- globals.c.orig 2002-12-18 11:28:02.000000000 +0100
+++ globals.c 2003-01-23 14:02:37.000000000 +0100
@@ -802,6 +802,7 @@
BOOL smtp_input = FALSE;
int smtp_load_reserve = -1;
int smtp_mailcmd_count = 0;
+int smtp_max_unrecognized = 5;
FILE *smtp_out = NULL;
int smtp_port = -1;
uschar *smtp_etrn_command = NULL;
--- globals.h.orig 2002-12-18 11:28:02.000000000 +0100
+++ globals.h 2003-01-23 14:02:30.000000000 +0100
@@ -481,6 +481,7 @@
extern BOOL smtp_input; /* TRUE if input is via SMTP */
extern int smtp_load_reserve; /* Only from reserved if load > this */
extern int smtp_mailcmd_count; /* Count of MAIL commands */
+extern int smtp_max_unrecognized; /* Maximum number of unrecognized cmds */
extern FILE *smtp_out; /* Incoming SMTP output file */
extern int smtp_port; /* Alternate SMTP port number */
extern uschar *smtp_ratelimit_hosts; /* Rate limit these hosts */
--- readconf.c.orig 2002-12-18 11:28:03.000000000 +0100
+++ readconf.c 2003-01-23 13:59:44.000000000 +0100
@@ -189,6 +189,7 @@
{ "smtp_etrn_command", opt_stringptr, &smtp_etrn_command },
{ "smtp_etrn_serialize", opt_bool, &smtp_etrn_serialize },
{ "smtp_load_reserve", opt_fixed, &smtp_load_reserve },
+ { "smtp_max_unrecognized", opt_int, &smtp_max_unrecognized },
{ "smtp_ratelimit_hosts", opt_stringptr, &smtp_ratelimit_hosts },
{ "smtp_ratelimit_mail", opt_stringptr, &smtp_ratelimit_mail },
{ "smtp_ratelimit_rcpt", opt_stringptr, &smtp_ratelimit_rcpt },
--- smtp_in.c.orig 2003-01-23 14:01:59.000000000 +0100
+++ smtp_in.c 2003-01-23 14:01:06.000000000 +0100
@@ -3058,7 +3058,7 @@
default:
- if (unknown_command_count++ >= 5)
+ if (unknown_command_count++ >= smtp_max_unrecognized)
{
/* Just logs */
synprot_error(L_smtp_syntax_error, 0, NULL, US"unrecognized command");