Utility to update IP Range address

This section contains scripts that hMailServer has contributed with. hMailServer 5 is needed to use these.
Post Reply
Senior user
Senior user
Posts: 512
Joined: 2016-12-08 02:21

Utility to update IP Range address

Post by mikedibella » 2021-06-10 21:05

I needed a way to periodically update a named IP Range with a single address to customize the IP Range characteristics for a client with a dynamic IP address.

hmsUpdateRangeIP.exe was written to update a specific IP Range identified by hostname with the address that hostname resolves to in DNS.

To use hmsUpdateRangeIP.exe, edit the appropriate .reg file for your OS and populate the Nameserver, Username, and Password fields with the DNS server, and credentials to access HMS. Change the Logging level (0-2) if you want more or less verbosity in the event log. Copy hmsUpdateRangeIP.exe to your hMailServer\Bin directory and schedule it to run using Task Scheduler, passing the IP Range name as a parameter.

The named IP Range must already exist in HMS, with the same name as the hostname being looked up. Set the range characteristics to your preference. hmsUpdateRangeIP.exe only updates the Upper IP and Lower IP with the first address returned by DNS. All other properties of the range are unchanged.

Written in Delphi. Source included. Requires The Indy Project libraries to compile. Freeware under The MIT License.
IP Range DDNS Updater
(202.14 KiB) Downloaded 5 times

Post Reply