1

Final Update

Problem erased in the least acceptable way: After re-installing the DNS-Server lead to even more problems, I re-installed the whole Operating System and - up to now - everything works like it should. Before anyone asks: This was/is an official download of Server 2008 from the official website, and not anything from anywhere.


Following this Cheat Sheet I'm able to set up an MX Record as other Ressource Records in Windows Server 2008 through CMD. I am also able to delete the Records through CMD and everything, EXCEPT the MX Record. This only works through the GUI. For whatever reasons.

I got that far:

Set: dnscmd /recordadd bigfirm.com @ MX 10 mail.bigfirm.com (works)

Delete: dnscmd /recorddelete bigfirm.com @ MX 10 mail.bigfirm.com → doesn't work

[→ source of commands]

The command seems is reported as executed properly but dnscmd /zoneprint bigfirm.com still lists the MX Record. Deleting it through the GUI is no problem – but also not the what I'm trying to achieve.

The 10 looks highly suspicious to me, but without it the command doesn't report successful execution – which doesn't really matter as it doesn't do what it should…


UPDATE

Three days later, getting desperate... So what I did was that, step by step:

  • Syntax: dnscmd /Recordadd ZONE NODE MX PRIORITY SERVER
    dnscmd /Recordadd tarpit post MX 10 mordor

  • Check what I did → dnscmd /zoneprint tarpit result (shortend):
    ; Zone: tarpit ; Server: mordor ; @ 3600 NS mordor. 3600 SOA mordor. hostmaster. 2 900 600 86400 3600 post 3600 MX 10 mordor.

  • Delete the MX Record:
    Syntax: dnscmd /recorddelete ZONE NODE MX 10 SERVER
    dnscmd /recorddelete tarpit post mx 10 mordor

  • Check what happend → dnscmd /zoneprint tarpit result (shortend):
    ; Zone: tarpit ; Server: mordor ; @ 3600 NS mordor. 3600 SOA mordor. hostmaster. 8 900 600 86400 3600 post 3600 MX 10 mordor.

I've tried a lot of combinations what to set for server, zone etc.: FQDN, with(out) a dot at the end, and whatnot… a whole trial and error session with the same result: The only way to delete the entry is via Servermanager on the GUI level.

What did I do wrong?!

I would highly appreciate if somebody could tell me the correct syntax with the names I used so it would be easier for me to translate this to other situations.

I'm quite new to this all and I'm not happy. I've also tried restarting etc. Doesn't work. Only on the GUI level.


Update 2:

  • Turns out I can't delete ANY Resource Records via cmd

  • Zones I completely deleted about a week ago reappeared, including all their fully working resource records! This suddenly happend after renaming & completely shutting down and booting the machine twice.

  • Looking through cached entries the system reported that MMC is broken and I've got the following details:

Beschreibung: Stopped working

Problemsignatur:
Problemereignisname: APPCRASH
Application Name: mmc.exe
Application Version: 6.0.6002.18005
Application Timestamp: 49e01c0a
Fault Module Name: dnsmgr.dll
Fault Module Version: 6.0.6002.18005
Fault Module Timestamp: 49e03737
Exception Code: c0000005
Exception Offset: 00049e6d
Betriebsystemversion: 6.0.6002.2.2.0.272.7
Gebietsschema-ID: 1031

  • This I get if I use the offered "debugging" option:

Problemsignatur:

Problemereignisname: APPCRASH
Anwendungsname: mmc.exe
Anwendungsversion: 6.0.6002.18005
Anwendungszeitstempel: 49e01c0a
Fehlermodulname: dnsmgr.dll
Fehlermodulversion: 6.0.6002.18005
Fehlermodulzeitstempel: 49e03737
Ausnahmecode: c0000005
Ausnahmeoffset: 00049e6d
Betriebsystemversion: 6.0.6002.2.2.0.272.7
Gebietsschema-ID: 1031
Zusatzinformation 1: fd00
Zusatzinformation 2: ea6f5fe8924aaa756324d57f87834160
Zusatzinformation 3: fd00
Zusatzinformation 4: ea6f5fe8924aaa756324d57f87834160


erch
  • 126
  • 10
  • The `10` specifies mailserver priority. Zone files can have multiple MX records; if a higher-priority MX doesn't resolve, it'll try the next MX, and so on. Basically, it's supposed to be there. –  May 26 '14 at 16:44
  • @lunchmeat317 This I know, but thank you. There is only this one entry and, as an exercise, I sucessfully set but unsucessfully tried to delete it. Also interesting: Only one MX entry but without specifying it's priority I don't even get a "sucesfully executed" statement (roughly translated from the original message; not in English) – erch May 26 '14 at 16:52

1 Answers1

1

The exact syntax is

dnscmd ServerName /recorddelete ZoneName NodeName RRType RRData[/f]

So for example this would be:

dnscmd /recorddelete test.contoso.com NodeServerName MX 10 mailserver.test.contoso.com

I suspect, you are using the @ rather then the actual node name?


Seeing that the above post hasn't helped you, I can only confirm this works on my DNS servers:

C:\Users\Administrator>dnscmd /recordadd test1.demo.com @ MX 100 test.mailserver.com

Add MX Record for test1.demo.com at test1.demo.com Command completed successfully.

C:\Users\Administrator>dnscmd /recorddelete test1.demo.com @ MX 100 test.mailserver.com > Are you sure you want to delete record? (y/n) y

Deleted MX record(s) at test1.demo.com Command completed successfully.

Cold T
  • 2,401
  • 2
  • 17
  • 29
  • For completeness' sake: `/f` stands for: "Don't bother me with asking for confirmation, just do as I told you". Also: both examples have the same source: http://technet.microsoft.com/en-us/library/cc772069.aspx and yes, I got that far to look for a solution at the the official vendor's website - whicht didn't help me much and was the reason I came here for asking. Having it here through Copy & Paste as answer is at least a nice try, so thank you for that! – erch Jun 04 '14 at 19:46
  • ah yes, thank you! It works perfectly now after re-installin the whole OS. Anyhow: Thanks, Cold T :) – erch Jun 20 '14 at 17:16