# This file allows you to declare traffic shaping parameters by domain. # Each domain has a section as shown below. The domain name must be enclosed # in square-brackets and quotes to be correctly recognized. # # The default for a domain is to use MX rollup; when this file is loaded, # the MX is resolved for the domain and all domains that rollup to that # same set of MX records will share those settings. # It is an error to list multiple different domains that rollup to the same # MX, as that would result in an ambiguous configuration. The error will be # noted when the configuration is loaded. # # If you do not wish to use mx rollup for a domain, you can set # `mx_rollup = false` as one of the values in the domain section, as shown # in the `example.com` example in this file. # # If a domain is a NULL MX (such as `example.com`), it cannot be used with # mx_rollup, because there are no MX's to roll up into. # # You may compose multiple shaping files over each other; in that case you # have the option of specifying `replace_base = true` in a domain in a # later file. That will have the effect of ignoring all previous values # for that domain. # # The acceptable set of values in a domain section are valid parameters to # kumo.make_egress_path. # # # Members of the community are encouraged to share their shaping configuration # for various domains; please feel empowered to open a PR! # DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN WHEN YOU UPDATE YOUR INSTALLATION # INSTEAD CREATE YOUR OWN FILE AND ADD IT TO THE LIST OF FILES LOADED IN YOUR # INIT POLICY: # -- load the community shaping.toml + local settings # kumo.on( # 'get_egress_path_config', # shaping:setup { # '/opt/kumomta/etc/shaping.toml', # '/opt/kumomta/etc/shaping-custom.json', # } # ) ["default"] connection_limit = 10 max_connection_rate = "100/min" max_deliveries_per_connection = 100 max_message_rate = "100/s" idle_timeout = "60s" data_timeout = "30s" data_dot_timeout = "60s" enable_tls = "Disabled" consecutive_connection_failures_before_delay = 100 max_ready = 8192 [["default".automation]] regex=[ '/Messages from \d+\.\d+\.\d+\.\d+ temporarily deferred/', '/All messages from \d+\.\d+\.\d+\.\d+ will be permanently deferred/', '/has been temporarily rate limited due to IP reputation/', '/Unfortunately, messages from \d+\.\d+\.\d+\.\d+ weren.t sent/', '/Server busy\. Please try again later from/' ] action = [ {SetConfig={name="max_message_rate", value="1/minute"}}, {SetConfig={name="connection_limit", value=1}} ] duration = "90m" ["webhook-clickhouse.log_hook"] connection_limit = 70 max_connection_rate = "10000/min" mx_rollup = false max_ready = 16384 ["webhook-bounces.log_hook"] connection_limit = 100 max_connection_rate = "10000/min" mx_rollup = false ["http://127.0.0.1:3008.tsa.kumomta"] connection_limit = 300 max_connection_rate = "10000/min" mx_rollup = false # https://support.google.com/mail/answer/81126 ["gmail.com"] max_deliveries_per_connection = 50 connection_limit = 40 max_message_rate = "1000/s" enable_tls = "Required" consecutive_connection_failures_before_delay = 5 # PROVIDED BY YAHOO! DIRECTLY # https://senders.yahooinc.com/best-practices ["yahoo.com"] max_deliveries_per_connection = 20 [["yahoo.com".automation]] regex = "\\[TS04\\]" action = "Suspend" duration = "2 hours" # PROVIDED BY COMCAST DIRECTLY # https://spa.xfinity.com/postmaster # https://spa.xfinity.com/postmaster?faq=comcast-mail-errors ["comcast.net"] connection_limit = 25 max_deliveries_per_connection = 250 enable_tls = "Required" idle_timeout = "30s" consecutive_connection_failures_before_delay = 24 # PROVIDED DIRECTLY BY MAIL.COM ["mail.com"] max_deliveries_per_connection = 100 # https://www.postmastery.com/orange-postmaster-smtp-error-codes-ofr/ ["orange.fr"] connection_limit = 3 # PROVIDED DIRECTLY FROM MAILGUN FOR SENDERS WHO SMARTHOST VIA MAILGUN ["smtp.mailgun.com"] connection_limit = 7000 max_deliveries_per_connection = 3 ############################################################# # example.com is used by our integration tests, while also demonstrating # a couple of example options. No one should be sending mail to example.com: # it has a NULL MX record and doesn't accept mail. ["example.com"] mx_rollup = false max_deliveries_per_connection = 100 connection_limit = 3 # If you want to declare local overrides with settings for your locally defined # egress sources, you can syntax like the following; the section is named: # [DOMAIN.sources.SOURCE] where both the DOMAIN and the SOURCE need to be quoted # with double quotes. # If you do want to do this, don't edit this file at /opt/kumomta/share/policy-extras/shaping.toml, # but instead create your own copy at `/opt/kumomta/etc/shaping.toml` and provide # your overrides there. ["example.com".sources."my source name"] connection_limit = 5