GreenArrow Email Software Documentation

Dynamic Delivery

Overview

The Dynamic Delivery system in GreenArrow adjusts throttling settings based on how much mail each ISP is accepting, rejecting and deferring.

This allows your server to gracefully slow down trying to deliver email to ISPs that are not accepting email from you. This can help with email delivery.

This is not a panacea to all email delivery problems. Reliable email delivery still requires sending email that is wanted and expected, has low complaints, and has high engagement.

If an ISP is accepting email normally, then email delivery is attempted at the full speed configured in the IP Address or Throttle Template.

Throttle Programs can be used to control the rate that email deliveries are attempted when an ISP is not accepting email normally.

If the deferral or failure thresholds of a Throttle Program are exceeded, then the (presumably slower) throttle limits configured in the Throttle Program are applied for the amount of time specified in the Throttle Program. This state is referred to as Backoff Mode.

Throttle Program Configuration

  1. Go to the “Configuration” => “VirtualMTAs” page
  2. In the “IP Address” box click on the “Throttling Configuration” button
  3. See the “Throttle Programs” section:
  4. Click “Add Throttle Program” to add a new program, or click “Edit” next to an existing throttle program:

The following settings make up a Throttle Program:

  • Name

    How the throttle program is identified. Must be case-insensitive unique.

  • Max Connections in Backoff Mode

    This is the setting for Maximum Concurrent Connections that is used when the throttle is in Backoff Mode.

    Attached to the input field is a dropdown to select whether to use a Fixed Value or a Percentage of Normal.

    When Fixed Value is selected, the entered value will be used directly. That value must be an integer greater than or equal to 1.

    When Percentage of Normal is selected, the Maximum Concurrent Connections in backoff mode will be the entered percentage of the Maximum Concurrent Connections when not in backoff mode, rounded to the nearest integer. A minimum calculated value of 1 will be used. The entered percentage must be between 1 and 100.

  • Max Messages Per Hour in Backoff Mode

    This is the setting for Max Messages Per Hour (actually the maximum number of delivery attempts per hour) that is used when the throttle is in Backoff Mode.

    Attached to the input field is a dropdown to select whether to use a Fixed Value or a Percentage of Normal.

    When Fixed Value is selected, the entered value will be used directly. That value must be an integer greater than or equal to 1.

    When Percentage of Normal is selected, the Max Messages Per Hour in backoff mode will be the entered percentage of Max Messages Per Hour when not in backoff mode, rounded to the nearest integer. A minimum calculated value of 1 will be used. The entered percentage must be between 1 and 100.

  • Duration of Backoff Mode Before Returning to Normal (seconds)

    This is how long the Throttle will remain in Backoff Mode when Backoff Mode is triggered. The decision of whether or not to begin Backoff Mode is evaluated every few seconds.

    This is required and must be an integer greater than or equal to 1.

  • SMTP Failure Percentage

    Criteria for starting Backoff Mode. See the “Triggering Backoff Mode” section below for exact triggering details. If blank, the failure percentage isn’t used as a criterion for starting Backoff Mode.

    This is an integer between 1 and 100.

  • SMTP Deferral+Failure Percentage

    Criteria for starting Backoff Mode. See the “Triggering Backoff Mode” section below for exact triggering details. If blank, the deferral percentage isn’t used as a criterion for starting Backoff Mode.

    This is an integer between 1 and 100.

  • Required SMTP Attempts in the last 5 min

    Criteria for starting Backoff Mode. Number of required delivery attempts. See the “Triggering Backoff Mode” section below for exact triggering details.

    This is required and must be an integer greater than or equal to 1.

Additional requirements:

  • An “SMTP Failure Percentage” and/or an “SMTP Deferral+Failure Percentage” must be specified.

Configuring Throttles to use Throttle Programs

On the IP Address and Throttle Template editing screens, each throttle limit row has a drop-down to select the Throttle Program to apply:

Keep the default Throttle Program of “None” if you do not want automatic throttling.

How Backoff Mode works

Triggering Backoff Mode

Backoff Mode can be triggered in two ways:

  1. SMTP conversation matching the smtp_match_begin_backoff_mode or smtp_pattern directives.

  2. Evaluation of throttle programs.

Evaluation of Throttle Programs

Every 5 minutes, on the 5-minute mark (on the hour, 5 minutes after the hour, 10 minutes after the hour, etc), each throttle is evaluated to see if Backoff Mode should be engaged based on the statistics of the delivery attempts in the last five minutes.

Backoff Mode is triggered if:

  • The number of SMTP delivery attempts in the last 5 minutes is equal to or greater than the “Required SMTP Attempts in the last 5 min”

    and

  • Any of the following is true:

    • The percentage of SMTP deliveries resulting in a permanent failure exceeds “SMTP Failure Percentage” configured in the Throttle Program.

    • The percentage of SMTP deliveries resulting in either a permanent failure or a deferral (temporary failure) exceeds “SMTP Deferral+Failure Percentage” configured in the Throttle Program.

When a throttle is in Backoff Mode, the Maximum Connections and Maximum Messages Per Hour settings configured in the IP Address or Throttle Template are overridden by the “Max Connections in Backoff Mode” and “Max Messages Per Hour in Backoff Mode” configured in the Throttle Program.

Ending Backoff Mode

Every few seconds, each throttle in Backoff Mode is evaluated to see if Backoff Mode should be ended. If the time since Backoff Mode began is greater than “Duration of Backoff Mode Before Returning to Normal (seconds)” then the Backoff Mode is ended.

When Backoff Mode ends, the throttle settings return to the throttle speeds configured in the IP address and/or Throttle Template.

Backoff Mode Notifications

GreenArrow can be configured to deliver email notifications whenever backoff mode begins or ends. These notifications apply to all backoff mode changes across the system.

See the notify_on_backoff configuration directive for more information.

Viewing Throttle Status

Backoff Mode of Each Throttle

On the IP Address view page, each rule that is configured to use a Throttle Program has its throttling state listed to the right of the Throttle Program name. Either “In Backoff” or “Normal” is shown:

Throttle State View Page

Clicking on a rule’s magnifying glass button will take you to the Throttle State View page:

This page shows:

  • Current Backoff Mode state of the throttle: “Normal” or “In Backoff
  • If in Backoff Mode:
    • Time that Backoff Mode began
    • Time that Backoff Mode will end
  • A log showing:
    • When Backoff Mode began and ended
    • Updates to the list of domains in this throttle

How to See all Throttles in Backoff Mode

  1. Go to “Configuration” => “Virtual MTAs”,
  2. In the “IP Addresses” section click “Throttling Configuration”
  3. In the “Reports” section click on “Throttles Currently in Backoff Mode”

For each throttle, the following is shown:

  • Time Backoff Mode began and will end
  • IP Address name
  • IP Address
  • Throttle Program name
  • First three domain names of this throttle

Copyright © 2012–2024 GreenArrow Email