[exim-dev] [Bug 579] New: smtp_reserve_hosts are not really …

Pàgina inicial
Delete this message
Reply to this message
Autor: Magnus Holmgren
Data:  
A: exim-dev
Assumptes nous: [exim-dev] [Bug 579] smtp_reserve_hosts are not really guaranteed smtp_accept_reserve connections
Assumpte: [exim-dev] [Bug 579] New: smtp_reserve_hosts are not really guaranteed smtp_accept_reserve connections
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=579
           Summary: smtp_reserve_hosts are not really guaranteed
                    smtp_accept_reserve connections
           Product: Exim
           Version: 4.67
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Mail Receipt
        AssignedTo: ph10@???
        ReportedBy: holmgren@???
                CC: exim-dev@???



The specification for smtp_accept_reserve states that "When smtp_accept_max is
set greater than zero, this option specifies a number of SMTP connections that
are reserved for connections from the hosts that are specified in
smtp_reserve_hosts. [...] It is a guarantee that this group of hosts can always
get at least smtp_accept_reserve connections."

However, this is a weak guarantee, because only smtp_accept_max and
smtp_accept_max_per_host (and some others) are checked in the main daemon loop,
and in particular before incrementing smtp_accept_count, but
smtp_accept_reserve (and smtp_load_reserve) is not checked until after forking
and looking up the name of the connecting host (because the DNS lookup takes
time). During this time, other connections can arrive, until smtp_accept_max is
reached.

The only solution I could think of so fare involves limiting smtp_reserve_hosts
to a simple list of IP addresses/nets (which should normally be adequate to its
purpose), so that matching the remote address can be done quickly enough. If no
good enough solution exists, the specification should be clarified. As a
workaround one can increase smtp_accept_max and smtp_accept_reserve until the
probability that there will be smtp_accept_reserve simultaneous
non-smtp_reserve_hosts connections waiting to be dropped is sufficiently small.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email