Loading ...
Sorry, an error occurred while loading the content.
 

Re: Master cf setting

Expand Messages
  • Noel Jones
    ... http://www.postfix.org/OVERVIEW.html http://www.postfix.org/TUNING_README.html http://www.postfix.org/QSHAPE_README.html -- Noel Jones
    Message 1 of 9 , Dec 1, 2006
      At 07:38 AM 12/1/2006, Joey wrote:
      >Another question which is somewhat related is lets say you
      >have an outgoing
      >mailserver, and a client sends out 500 messages, does
      >postfix try to deliver
      >them all at the same time?
      >
      >Would setting this limit control that as well?

      http://www.postfix.org/OVERVIEW.html
      http://www.postfix.org/TUNING_README.html
      http://www.postfix.org/QSHAPE_README.html

      --
      Noel Jones
    • Victor Duchovni
      ... 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
      Message 2 of 9 , Dec 1, 2006
        On Fri, Dec 01, 2006 at 02:41:39PM +0100, Ralf Hildebrandt wrote:

        > * Joey <Joey@...>:
        > > 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:majordomo@...?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.
      • Wietse Venema
        ... Different things happen at different protocol levels. At the TCP level, there is no difference. The connection completes as usual. At the SMTP level,
        Message 3 of 9 , Dec 1, 2006
          Joey:
          > If I put 100 for maxproc under smtp, this will control the MAX connections
          > to the smtp port at any given time right?
          >
          > # ==========================================================================
          > # 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?

          Different things happen at different protocol levels.

          At the TCP level, there is no difference. The connection
          completes as usual.

          At the SMTP level, things do change. There is no server "220 my.host.name"
          greeting until an smtpd process becomes available.

          However, if you have 100s or 1000s of clients, the TCP behavior
          changes too. The connection no longer completes; the clients sees
          a TCP timeout. I haven't yet implemened an "overflow responder"
          that you can specify in master.cf.

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

          The anvil service logs some peak information.

          Postfix 2.3 and later log a warning when all ports are busy.

          warning: service "smtp" (25) has reached its process limit
          "100": new clients may experience noticeable delays

          > Does this 100 consider BOTH incoming smtp as well as outgoing smtp?

          This seting is for smtpd, which is used for receiving mail.

          Wietse
        Your message has been successfully submitted and would be delivered to recipients shortly.