[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MaxSameIpSource, system load, and "ps" output (bug?)
due to my own carelessness, my home machine have to receive a large
number of mails in the past couple of days, which caused some "bugs"
to surface. There are three such "bugs" (or so I think, for now)
that are related to ZMailer.
First, MaxSameIpSource doesn't seem to work. Even though I set it to
2 (which, incidentally, means 8 simultaneous connections, according
to the source code -- rather misleading imho), I still get about 30
connections from a machine.
Second, -L (system load) parameter of smtpserver doesn't seem to work
either. When the kernel started killing processes, the system load
was well over 10, though I ran my smtpserver with -L 3.
The second problem might as well be something wrong with my system,
something wrong with my syntax, or just pure bad luck (as my system
is able to cope with the load, with system load well under 3, for
the past few hours). However, the first problem looks real to me, at
least at this point (as there still are more than 4 connections from
the same IP source even though MaxSameIpSource is now 1).
The third problem is more of a cosmetic problem. Assuming I understand
the code correctly, the patch to fix the problem is (cut-and-paste
from "screen" window):
--- zmailer-2.99.50s11.dist/smtpserver/smtpserver.c Thu Nov 12 15:59:53 1998
+++ zmailer-2.99.50s11/smtpserver/smtpserver.c Sun Mar 14 23:15:37 1999
@@ -1730,7 +1730,7 @@
for (s = s + strlen(s); s < buf + cmdlen; ++s)
*s = '\0';
buf[cmdlen] = '\0';
- memcpy((char *) cmdline, buf, cmdlen);
+ memcpy((char *) cmdline, buf, cmdlen + 1);
The particular code is trying to modify the command line as shown by
"ps". However, it copied one less byte than it should, making junk
appear in the ps output. Actually, it looks like it is overwriting
environment variables; I don't know if this is indeed the case and/
or whether there is a problem with that.
I also have a question, related to the first problem. Since the 35+
connections eventually crashed my machine, I wonder if there is some
parameter or command line option that will limit the total number of
smtpserver processes (no matter what IP it is connecting from). That
might be a helpful option.
The system in question is ZMailer 2.99.50s11 on Linux 2.2.2, libc5.