diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
index c48ebaf1..893524ff 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
@@ -9,7 +9,7 @@
-->
-
+
@@ -17,7 +17,7 @@
-->
-
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs
index cc723f6a..7c52e8f0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.cs
@@ -62,6 +62,13 @@ namespace WebsitePanel.Portal
set { ViewState["HideMailDomains"] = value; }
}
+ public bool HideMailDomainPointers
+ {
+ get { return (ViewState["HideMailDomainPointers"] != null) ? (bool)ViewState["HideMailDomainPointers"] : false; }
+ set { ViewState["HideMailDomainPointers"] = value; }
+ }
+
+
public bool HideDomainPointers
{
get { return (ViewState["HideDomainPointers"] != null) ? (bool)ViewState["HideDomainPointers"] : false; }
@@ -111,6 +118,7 @@ namespace WebsitePanel.Portal
WebSite[] sites = null;
Hashtable htSites = new Hashtable();
+ Hashtable htMailDomainPointers = new Hashtable();
if (HideWebSites)
{
sites = ES.Services.WebServers.GetWebSites(PackageId, false);
@@ -127,6 +135,25 @@ namespace WebsitePanel.Portal
}
}
+ if (HideMailDomainPointers)
+ {
+ Providers.Mail.MailDomain[] mailDomains = ES.Services.MailServers.GetMailDomains(PackageId, false);
+
+ foreach (Providers.Mail.MailDomain mailDomain in mailDomains)
+ {
+ DomainInfo[] pointers = ES.Services.MailServers.GetMailDomainPointers(mailDomain.Id);
+ if (pointers != null)
+ {
+ foreach (DomainInfo p in pointers)
+ {
+ if (htMailDomainPointers[p.DomainName.ToLower()] == null) htMailDomainPointers.Add(p.DomainName.ToLower(), 1);
+
+ }
+ }
+ }
+ }
+
+
ddlDomains.Items.Clear();
// add "select" item
@@ -148,6 +175,13 @@ namespace WebsitePanel.Portal
}
}
}
+
+
+ if (HideMailDomainPointers)
+ {
+ if (htMailDomainPointers[domain.DomainName.ToLower()] != null) continue;
+ }
+
if (HideInstantAlias && domain.IsInstantAlias)
continue;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailEditAddress.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailEditAddress.ascx
index bb808b7a..6037cbc1 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailEditAddress.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/MailEditAddress.ascx
@@ -9,7 +9,7 @@
@
-
+
|
|