DNS Helper for Scripts

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

DNS Helper for Scripts

Post by mikedibella » 2020-03-27 04:45

Here's a quick little DLL I wrote to help with basic name DNS tasks in scripts.

Written in Delphi. Source included. No dependencies. Uses older Winsock functions but working fine on my Server 2012 HMS implementation. Untested on 2016.

Code: Select all

Set objDNSLookup = CreateObject("DNSScriptUtil.DNSLookup")
sHostname = "mail.hmailserver.com"
sIPAddress = objDNSLookup.GetIPByHostname(sHostName)
sRevHostname = objDNSLookup.GetHostnameByIP(sIPAddress)
wscript.echo sHostName & " --> " & sIPAddress & vbCRLF & sIPAddress & " --> " & sRevHostName
Attachments
DNSScriptUtil.zip
(171.1 KiB) Downloaded 621 times

Post Reply