locked
How do AcceptedDomains from Windows Service? RRS feed

  • Question

  • How do you get the Exchange Server's AcceptedDomains from a normal Windows Service?

    I wrote my SmtpReceiveAgent that would communicate with my Windows Service.

    I know I can get the AcceptedDomains from the SmtpServer parameter that I get from the SmtpReceiveAgentFactory, however, I don't want to bombard my Windows Service to update the AcceptedDomains list for every email being receive, plus i mean most of the time this list is rarely change once configured...

    So is there a way to grab the AcceptedDomains from a normal Windows Service without calling the ps1 script function Get-AcceptedDomains, (this function is only available in Exchange Management Shell anyway)?

     

    Monday, July 31, 2017 5:38 PM

Answers

  • You could query the Configuration partition in Active Directory eg "CN=Accepted Domains,CN=Transport Settings,CN=exdev,CN=Microsoft Exchange,CN=Services,CN=Configuration" using LDAP via System Directory services.

    Cheers
    Glen

    • Marked as answer by totszwai Tuesday, August 1, 2017 1:14 PM
    Tuesday, August 1, 2017 1:55 AM

All replies

  • You could query the Configuration partition in Active Directory eg "CN=Accepted Domains,CN=Transport Settings,CN=exdev,CN=Microsoft Exchange,CN=Services,CN=Configuration" using LDAP via System Directory services.

    Cheers
    Glen

    • Marked as answer by totszwai Tuesday, August 1, 2017 1:14 PM
    Tuesday, August 1, 2017 1:55 AM
  • Glen Scales the MVP
    Tuesday, August 1, 2017 1:14 PM