|
|
 |  |
Re: Need AppleScript Help - UrgentFrom: Men & Mice Support Date: Friday, March 23, 2001
Time: 2:04:37 pmWhat version of QuickDNS Pro? If you're using QuickDNS Pro 2.2.1,
this script should work:
____________________________________________________________________
property old_MX : "mail.buxton.net."
property new_MX : "new.mail.server."
on run
tell application "Finder"
set AdminApp to application file id "QDNS"
set QDNSFolder to folder of AdminApp
set PDFolder to folder "Primary Data" of =AC
folder "QuickDNS Data" of QDNSFolder
set PDFiles to every item of PDFolder as list
if (count of PDFiles) > 0 then
repeat with theFile in PDFiles
my processFile(theFile)
end repeat
end if
end tell
end run
on processFile(theFile)
tell application "Finder" to open theFile
tell application "QuickDNS Pro Admin"
set domain to first document
try
set MXInfoHost to mailhost name of =AC
every MX record of domain as list
on error
set MXInfoHost to {}
end try
if (count of MXInfoHost) > 0 then
repeat with i from 1 to =AC
(count of items in MXInfoHost)
if item i of MXInfoHost =3D old_MX then
delete MX record i of domain
end if
end repeat
end if
close domain saving yes in alias (theFile as text)
end tell
end processFile
____________________________________________________________________
Chris Buxton Men & Mice
cbuxton@menandmice.com We Make DNS Easy!
At 9:49 AM -0800 3/23/01, George A. Ruzzier Jr. wrote:
>Hi,
>
>I tried to modify an applescript off the support site, but could not make
>this work.
>
>What I need is to check each document in the Primary Data folder for an MX
>value of "mail.xyz.com". I have a handful of records out there that have a
>secondary MX record for a server that is not relaying mail, thus causing
>problems for us.
>
>So, what I need to happen is:
>
>1. Check each document MX record to find a value of "mail.xyz.com"
>
>2. If "mail.xyz.com" exists, leave the document open
>
>3. Else, close the document
>
>Better yet, if it exists, clear that MX record :-)
>
>Can you help Chris??
>
>Thanks in advance!!
>
>--------------------------------------------------
>George A. Ruzzier Jr. - President
>InnoTech - Internet Presence Specialists
>Phone: 949.770.9404, Ext 115 - FAX: 949.770.9406
>Visit: http://www.inno-tech.com
>Sales: mailto:sales@inno-tech.com
>Support: mailto:support@inno-tech.com
>--------------------------------------------------
>* Web Design * Animation * Hosting * Co-Location *
> * Database Programming & E-Commerce Solutions *
|

Return to Digital Point Solutions' Home Page |