This patch adds --listen-queue, in case somebody wants to use something
other than SOMAXCONN.
It's purely optional. I kind of doubt anyone would ever care.
Brian
=== qpsmtpd
==================================================================
--- qpsmtpd (revision 2227)
+++ qpsmtpd (local)
@@ -41,6 +41,7 @@
my $MAXCONNIP = 5; # max simultaneous connections from one IP
my $PAUSED = 0;
my $NUMACCEPT = 20;
+my $LISTENQUEUE = SOMAXCONN;
sub help {
print <<EOT;
@@ -51,6 +52,7 @@
-l, --listen-address addr : listen on a specific address; default 0.0.0.0
-p, --port P : listen on a specific port; default 2525
-c, --limit-connections N : limit concurrent connections to N; default 15
+ -q, --listen-queue N : maximum number of pending connections; default
SOMAXCONN
-u, --user U : run as a particular user; defualt 'smtpd'
-m, --max-from-ip M : limit connections from a single IP; default 5
-j, --procs J : spawn J processes; default 1
@@ -69,6 +71,7 @@
GetOptions(
'p|port=i' => \$PORT,
'l|listen-address=s' => \$LOCALADDR,
+ 'q|listen-queue=s' => \$LISTENQUEUE,
'j|procs=i' => \$PROCS,
'd|debug+' => \$DEBUG,
'c|limit-connections=i' => \$MAXCONN,
@@ -174,7 +177,7 @@
Proto => IPPROTO_TCP,
Blocking => 0,
Reuse => 1,
- Listen => SOMAXCONN )
+ Listen => $LISTENQUEUE )
or die "Error creating server $LOCALADDR:$PORT : [EMAIL
PROTECTED]";
IO::Handle::blocking($SERVER, 0);