OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Master cf setting

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Fri Dec 01 2006 - 07:56:13 CST


On Fri, Dec 01, 2006 at 02:41:39PM +0100, Ralf Hildebrandt wrote:

> * Joey <JoeyWeb56.Net>:
> > If I put 100 for maxproc under smtp, this will control the MAX connections
> > to the smtp port at any given time right?
>
> Yes.
>
> > # ==========================================================================
> > # service type private unpriv chroot wakeup maxproc command + args
> > # (yes) (yes) (yes) (never) (100)
> > # ==========================================================================
> > 26 inet n - n - - smtpd
> > smtp inet n - n - 100 smtpd
> >
> > What happens when the 101st connection is attempted, does it get server
> > busy, and then retry?
>
> It should

Actually the connection (TCP 3-way handshake) completes, but as there
at that moment no process to handle it, no "220 banner" is sent until
one of the existing connections is closed and a process becomes available.

The kernel's queue of completed, but not accepted() by a process connections
is finite (Postfix asks for the larger of $default_process_limit and the
service process limit, the kernel may assign a different limit), when this
limit of queued connections is reached, SYN packets are dropped.

> > How can I tell what the peak amount of connections are over the course of a
> > day?

Periodically, run "netstat -an | grep ESTABLISHED | grep -c
os-dependent-pattern-port-25-in", save the output to a file. This will
also count the completed, but not accepted() connections, so the output
may at times exceed 100, and show that you may need to raise the limit.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.