GreenArrow Email Software Documentation

Updating Throttle Settings on the Command Line

Overview

This page describes how to update throttle settings through command-line utilities. The command-line utilities can dump the throttle settings to a file, which you can edit, and then you can reload from that file. This allows for bulk updating of settings.

This method does not import or export the default throttling rule for the IP address or Throttle Template.

An alternative method is in the Updating Throttle Settings in SQL page.

To update throttle settings via a web interface, see the Throttling page.

To update throttle settings via API, see the Throttling Templates API and IP Addresses API.

Per-IP Address Rules

Get Throttle Override Rules for an IP Address

You can get the throttle override rules for an IP address by running the following command:

hvmail_set export_ipaddr_throttle_rules $VirtualMTA

For example, to save the throttle overwrite rules for the smtp1-1 VirtualMTA to the smtp1-1.txt file, run:

hvmail_set export_ipaddr_throttle_rules smtp1-1 > smtp1-1.txt

The resulting file will resemble the following:

aol.com                                                      : maxconn=   20, msgperhour=  40000, backlog=null, backlog_disk=null, as_group=1
whatever.com                                                 : maxconn=   20, msgperhour=      0, backlog=null, backlog_disk=null, as_group=1
yahoo.com,ymail.com,rocketmail.com                           : maxconn=  150, msgperhour= 250000, backlog=null, backlog_disk=null, as_group=1

This command only exports the override rules for the IP, and does not include any rules inherited from the IP’s Throttle Template.

Set Throttle Override Rules for an IP Address

You can set the throttle override rules for an IP address by running the following command:

hvmail_set import_ipaddr_throttle_rules $VirtualMTA

Pipe data into this command using the same syntax shown in this document’s previous section. For example, to restore smtp1-1’s configuration from the smtp1-1.txt file, run:

cat smtp1-1.txt | hvmail_set import_ipaddr_throttle_rules smtp1-1

This will overwrite all of the override throttle rules for the IP address with the data received on STDIN.

Copy Throttle Override Rules Between IPs

You can copy throttle rules from one IP to another by combining the above two commands in a pipe:

hvmail_set export_ipaddr_throttle_rules $sourceVirtualMTA | hvmail_set import_ipaddr_throttle_rules $destinationVirtualMTA

For example, to copy smtp1-1’s configuration to smtp1-2:

hvmail_set export_ipaddr_throttle_rules smtp1-1 | hvmail_set import_ipaddr_throttle_rules smtp1-2

Throttle Template Rules

Get Throttle Template Rules

You can get the throttle override rules for a Throttle Template by running the following command:

hvmail_set export_ttemplate_throttle_rules $Template

For example, to save the throttle overwrite rules for the default Throttle Template to the default-template.txt file, run:

hvmail_set export_ttemplate_throttle_rules default > default-template.txt

The resulting file will resemble the following:

aol.com,aim.com,netscape.net,aol.co.uk,cs.com,verizon.net    : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
att.net,ameritech.net,bellsouth.net,flash.net,nvbell.net,pacbell.net,prodigy.net,snet.net,swbell.net,wans.net : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
comcast.net                                                  : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
cox.net                                                      : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
gmail.com,googlemail.com                                     : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
hotmail.com,hotmail.co.uk,live.com,msn.com,outlook.com,sympatico.ca : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
nolimit.discardallmail.drh.net                               : maxconn= 1000, msgperhour=      0, backlog=null, backlog_disk=null, as_group=1
optimum.net,optonline.net                                    : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
usa.net                                                      : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1
yahoo.com,ymail.com,rocketmail.com,sbcglobal.net,yahoo.ae,yahoo.at,yahoo.be,yahoo.ca,yahoo.ch,yahoo.co.id,yahoo.co.il,yahoo.co.in,yahoo.co.jp,yahoo.co.nz,yahoo.co.th,yahoo.co.uk,yahoo.co.za,yahoo.com.ar,yahoo.com.au,yahoo.com.br,yahoo.com.co,yahoo.com.hk,yahoo.com.hr,yahoo.com.mx,yahoo.com.my,yahoo.com.ph,yahoo.com.sg,yahoo.com.tr,yahoo.com.tw,yahoo.com.vn,yahoo.cz,yahoo.de,yahoo.dk,yahoo.es,yahoo.fi,yahoo.fr,yahoo.gr,yahoo.hu,yahoo.ie,yahoo.in,yahoo.it,yahoo.nl,yahoo.no,yahoo.pl,yahoo.pt,yahoo.ro,yahoo.ru,yahoo.se : maxconn=    5, msgperhour=   1000, backlog=null, backlog_disk=null, as_group=1

Set Throttle Template Rules

You can set the Throttle Template rules by running the following command:

hvmail_set import_ttemplate_throttle_rules $Template

Pipe data into this command using the same syntax shown in this document’s previous section. For example, to restore the custom template from the default-template.txt file, run:

cat default-template.txt | hvmail_set import_ttemplate_throttle_rules custom

This will overwrite all of the rules for the custom throttle template with the data received on STDIN.

Copy Rules Between Throttle Templates

You can copy rules between Throttle Templates by combining the above two commands in a pipe:

hvmail_set export_ttemplate_throttle_rules $sourceTemplate | hvmail_set import_ttemplate_throttle_rules $destinationTemplate

For example, to copy default’s configuration to custom:

hvmail_set export_ttemplate_throttle_rules default | hvmail_set import_ttemplate_throttle_rules custom


Copyright © 2012–2024 GreenArrow Email