Updating Throttle Settings on the Command Line
This page describes how to update some of the 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.
An alternative method can be found on the Updating Throttle Settings in SQL page.
To update throttle settings via a web interface, see the Throttling page.
Get Throttle Override Rules for an IP Address
You can get the throttle override rules for an IP address by running the following command:
/var/hvmail/bin/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:
/var/hvmail/bin/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, as_group=1 whatever.com : maxconn= 20, msgperhour= 0, backlog=null, as_group=1 yahoo.com,ymail.com,rocketmail.com : maxconn= 150, msgperhour= 250000, backlog=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:
/var/hvmail/bin/hvmail_set import_ipaddr_throttle_rules $VirtualMTA
Pipe data into this command that uses the same syntax as 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 | /var/hvmail/bin/hvmail_set import_ipaddr_throttle_rules smtp1-1
This will overwrite all of the override throttle rules for the IP address with the data that is received on STDIN.
Copy Throttle Override Rules from one IP to Another
You can copy throttle rules from one IP to another by combining the above two commands in a pipe:
/var/hvmail/bin/hvmail_set export_ipaddr_throttle_rules $sourceVirtualMTA | /var/hvmail/bin/hvmail_set import_ipaddr_throttle_rules $destinationVirtualMTA
For example, to copy
smtp1-1’s configuration to
/var/hvmail/bin/hvmail_set export_ipaddr_throttle_rules smtp1-1 | /var/hvmail/bin/hvmail_set import_ipaddr_throttle_rules smtp1-2
Note: This does not copy the default domain throttle settings for the IP address (what throttle limits to apply to any domains without specific rules).