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

275928Re: Adjust smtp to limitations of a host

Expand Messages
  • Victor Duchovni
    Mar 31 6:22 PM
    • 0 Attachment
      On Thu, Mar 31, 2011 at 10:18:52PM +0100, Mark Alan wrote:

      > On Thu, 31 Mar 2011 14:53:11 -0400, Victor Duchovni
      > <Victor.Duchovni@...> wrote:
      > > Why would this be a response to "too many recipient commands", a
      > > single message with many recipients is sent over a single connection,
      > > unless you have set an ill-advised destination recipient limit.
      >
      > All _recipient_limit parameters are all at their defaults. With the
      > exception of things related to ciphers and TLS, we try hard to keep the
      > default Postfix settings.
      >
      > > > /etc/postfix/main.cf
      > > > slow_destination_concurrency_failed_cohort_limit = 3 # we give up
      > > > after getting three 421
      > > > slow_destination_recipient_limit = 20 # keep it bellow 25
      > >
      > > This increases the number of connections, which is unlikely what you
      > > want, provided of course you have messages with a large recipient
      > > count.
      >
      > It was not obvious to us. The idea was simply to put a limit on each
      > burst of messages sent to the slow transport MTA's.

      The actual effect is to drive up the number of messages, this parameter
      limits the number of recipients per message delivery, thus a 100-recipient
      message now gets sent 5 times instead of the default 2.

      > > > /etc/postfix/master.cf
      > > > slow unix - - - - - smtp
      > > > -o syslog_name=postfix-slow
      > > > -o smtp_connection_reuse_time_limit=30s
      >
      > Should we use only those 2 lines, or should we also add
      > -o smtp_connection_cache_on_demand=no

      Connection caching can help reduce connection setup cost, especially
      when using rate delays, though you are then keeping an open connection
      needlessly idle every other second. If connectivity to the MX hosts
      in question is reliable (say they are using load balancers, ...)
      connection caching could be turned off...

      > > > /etc/postfix/main.cf
      > > > slow_initial_destination_concurrency = 2
      > > > slow_destination_concurrency_limit = 15
      > > > slow_destination_concurrency_failed_cohort_limit = 5
      > > > slow_destination_concurrency_positive_feedback = 1/5
      > > > slow_destination_concurrency_negative_feedback = 1/8
      > >
      > > That depends on how determined the remote site is to damage the
      > > SMTP eco-system by imposing counter-productive punitive mechanisms
      > > on legitimate senders.
      >
      > Being it the health ministry bureaucracy, I am pretty sure that they
      > have the time and resources to be creative at it.

      :-)

      > We know for sure that up until now they did not answer any emails regarding their strange
      > mail server policies.
      >
      > > You can certainly try, and report your
      >
      > We will wait for your opinion on the above
      > -o smtp_connection_cache... parameter, to try to those new settings.

      With rate delays in place, disabling connection caching may spread
      the load more evenly, but will reduce performance when one of the
      MX hosts is down. It's a trade-off.

      If you can take a small risk, you may be able to achieve reasonable
      throughput with less hand-tuning, by letting the more advanced feedback
      mechanisms in Postfix adjust the site's negative replies. This depends
      on the site's feedback being reasonably timely and the consequences of
      "overshoot" being transient.

      --
      Viktor.
    • Show all 16 messages in this topic