|
|
 |  |
Re: Can QDNS be used to run a DNS-based blacklist?From: Johan Solve Date: Monday, December 20, 1999
Time: 1:30:00 pmTwo scripting questions:
1. IP numbers should be "unsigned integers" according to the QDNS Admin aete dictionary. This appears to be wrong. Should it say "Text" in the dictionary?
2. Do you have a sample script to create secondary records? I have a working script for this but it requires that the Secondary Data window is already open and I haven't found a way to open that window via script. Or is it just to open the SD file?
My simple script (won't work if SD window is not open):
tell application "QuickDNS Pro Admin"
set domain to "mydomain.com"
set prime to "111.222.33.44"
make new SD record at end of document 1 with properties ¬
{name:domain, filename:domain, first IP number:prime}
end tell
>At 4:26 PM +0000 12/17/99, Steve Linford wrote:
>>I'd be really grateful if someone could tell me if this can be done with
>>AppleScript and QDNS Pro 2.1:
>>
>>I am working on setting up a DNS-based spam blacklist (similar to MAPS RBL)
>>which will list 'Spam-in-progress' (termed 'SIP'). Once properly working
>>this blacklist will then be hosted by the MAPS team, but for now I am
>>trying to develop it and will be hosting it here and as I'm Mac-based and
>>use QDNS for our domain servers I want to use QuickDNS Pro for this project.
>>
>>The domain file will consist of many hundreds of entries all like this:
>>
>>22.218.115.193.sip.uxn.com A 127.0.0.5
>>215.2.125.64.sip.uxn.com A 127.0.0.5
>>54.34.23.193.sip.uxn.com A 127.0.0.5
>>11.231.233.202.sip.uxn.com A 127.0.0.5
>>
>>So my question is, can I add these entries individually to a QDNS domain
>>(sip.uxn.com) via AppleScript? And if so, can I also then delete any one of
>>these entries via AppleScript? (I need to run everything from a FileMaker
>>database, and every IP listed must only remain in the blacklist for 24
>>hours. So FileMaker has to both add records and later delete them from
>>QDNS).
>>
>>If this can be done via Applescript, I'd be very grateful if someone could
>>tell me the correct syntax to add and delete a record to a QDNS domain.
>
>tell application "QuickDNS Pro Admin"
> open (path to domain file) as alias
> set theRecord to make new A record at end of document "sip.uxn.com."
> set name of theRecord to "192.168.1.2.sip.uxn.com."
> set IP number of theRecord to "127.0.0.5"
> save document "sip.uxn.com." in alias (path to domain file)
>end tell
>
>tell application "QuickDNS Pro Admin"
> open (path to domain file) as alias
> delete A record "192.168.1.2.sip.uxn.com." of document "sip.uxn.com."
> save document "sip.uxn.com." in alias (path to domain file)
>end tell
>
>Note that the delete step should delete the first A record by that name. If you have more than one, then the others will still be there. You could do a loop with a try statement to get around that, I suppose.
>____________________________________________________________________
>Chris Buxton cbuxton@menandmice.com
>Men & Mice http://www.menandmice.com
>Makers of: QuickDNS Pro
|

Return to Digital Point Solutions' Home Page |