Search Again:

Re: Can QDNS be used to run a DNS-based blacklist?

From: Men & Mice Support
Date: Saturday, December 18, 1999
Time: 3:31:00 am

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



Messages In This Thread:



Return to Digital Point Solutions' Home Page