I've used exim -bP to confirm that these values are being parsed as
expected. I also tried with the specific IP address of a single host in
smtp_reserve_hosts, but that makes no difference.
From 10.0.0.131, I can only establish 5 concurrent SMTP connections to
the server (10.0.0.130) before I get the message:
421 mail1.gambling.com: Too many concurrent SMTP connections from one IP address; please try again later.
Have I misunderstood the use of smtp_reserve_hosts and
smtp_accept_reserve?
Looking at the code, I don't understand how smtp_reserve_hosts and
smtp_accept_reserve ever get used, but then I didn't look for more than
about 2 minutes:
/* Check maximum number of connections. We do not check for reserved
connections or unacceptable hosts here. That is done in the subprocess because
it might take some time. */
if (smtp_accept_max > 0 && smtp_accept_count >= smtp_accept_max)
{
Below, I've included a typescript of an exim -bd -oX 2525 session. I've
only included the output from the 5th and 6th connection attempts.
Ciao,
Sheldon.
Script started on Fri Feb 22 06:04:16 2002
Exim version 3.34 debug level 9 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=Charlie Root
port = 2525
listening on all interfaces (IPv4)
pid written to /var/run/exim.2525.pid-bd
LOG: 0 MAIN
exim 3.34 daemon started: pid=22171, no queue runs, listening for SMTP on port 2525
set_process_info: 22171 daemon: no queue runs, port 2525
daemon running with uid=26 gid=6 euid=26 egid=6
listening on port 2525...
[...]
Connection request from 10.0.0.131/25354
4 SMTP accept processes running
listening on port 2525...
interface address = 10.0.0.130
host in rfc1413_hosts? no (!10.0.0.1/24)
sender_fullhost = [10.0.0.131]
sender_rcvhost = [10.0.0.131]
Process 22201 is handling incoming connection from [10.0.0.131]
checking for IP options
no IP options found
host in host_lookup? no (!10.0.0.1/24)
host in host_reject? no (option unset)
host in host_reject_recipients? no (option unset)
host in tls_hosts? no (option unset)
host in sender_unqualified_hosts? no (option unset)
host in receiver_unqualified_hosts? no (option unset)
host in helo_verify? no (option unset)
host in helo_accept_junk_hosts? no (option unset) SMTP>> 220 mail1.gambling.com ESMTP Exim 3.34 #1 Fri, 22 Feb 2002 06:04:33 -0500 set_process_info: 22201 handling incoming connection from [10.0.0.131]
ready for new message
smtp_setup_msg entered
Connection request from 10.0.0.131/1291
5 SMTP accept processes running
listening on port 2525...
interface address = 10.0.0.130
host in rfc1413_hosts? no (!10.0.0.1/24)
sender_fullhost = [10.0.0.131]
sender_rcvhost = [10.0.0.131]
Process 22203 is handling incoming connection from [10.0.0.131]
checking for IP options
no IP options found
host in host_lookup? no (!10.0.0.1/24)
host in host_reject? no (option unset)
host in host_reject_recipients? no (option unset)
host in tls_hosts? no (option unset)
host in sender_unqualified_hosts? no (option unset)
host in receiver_unqualified_hosts? no (option unset)
host in helo_verify? no (option unset)
host in helo_accept_junk_hosts? no (option unset) SMTP>> 220 mail1.gambling.com ESMTP Exim 3.34 #1 Fri, 22 Feb 2002 06:04:37 -0500 set_process_info: 22203 handling incoming connection from [10.0.0.131]
ready for new message
smtp_setup_msg entered
Connection request from 10.0.0.131/39435
rejecting SMTP connection (too many from one address: count=5 max=5
421 mail1.gambling.com: Too many concurrent SMTP connections from one IP address; please try again later.
LOG: 4 MAIN
Connection from 10.0.0.131 refused: too many connections from that address
listening on port 2525...
^C
Script done on Fri Feb 22 06:04:56 2002