diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index 355e1325..a339dd9c 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -6082,3 +6082,72 @@ set PropertyValue='%PROGRAMFILES(x86)%\PHP\php.exe'
where PropertyName='Php4Path' and ProviderId in(101, 105)
GO
+
+-- Exchange2013 Shared and resource mailboxes
+
+-- Exchange2013 Shared and resource mailboxes Quotas
+
+IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.SharedMailboxes')
+BEGIN
+INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota])
+VALUES (427, 12, 30, N'Exchange2013.SharedMailboxes', N'Shared Mailboxes per Organization', 2, 0, NULL, NULL)
+END
+GO
+
+IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.ResourceMailboxes')
+BEGIN
+INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota])
+VALUES (428, 12, 31, N'Exchange2013.ResourceMailboxes', N'Resource Mailboxes per Organization', 2, 0, NULL, NULL)
+END
+GO
+
+-- Exchange2013 Shared and resource mailboxes Organization statistics
+
+ALTER PROCEDURE [dbo].[GetExchangeOrganizationStatistics]
+(
+ @ItemID int
+)
+AS
+
+DECLARE @ARCHIVESIZE INT
+IF -1 in (SELECT B.ArchiveSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
+BEGIN
+ SET @ARCHIVESIZE = -1
+END
+ELSE
+BEGIN
+ SET @ARCHIVESIZE = (SELECT SUM(B.ArchiveSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
+END
+
+IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
+BEGIN
+SELECT
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
+ (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains,
+ (SELECT MIN(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace,
+ (SELECT MIN(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace,
+ @ARCHIVESIZE AS UsedArchingStorage
+END
+ELSE
+BEGIN
+SELECT
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
+ (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
+ (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains,
+ (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace,
+ (SELECT SUM(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace,
+ @ARCHIVESIZE AS UsedArchingStorage
+END
+
+
+RETURN
+GO
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs
index 1d2702c2..2c3ec20d 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs
@@ -123,6 +123,9 @@ order by rg.groupOrder
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; // Archiving
public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes";
+ public const string EXCHANGE2013_SHAREDMAILBOXES = "Exchange2013.SharedMailboxes"; // Shared and resource mailboxes
+ public const string EXCHANGE2013_RESOURCEMAILBOXES = "Exchange2013.ResourceMailboxes";
+
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs
index d0e48fee..36fc7ed3 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs
@@ -193,6 +193,9 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
stats.UsedArchingStorage = tempStats.UsedArchingStorage;
+
+ stats.CreatedSharedMailboxes = tempStats.CreatedSharedMailboxes;
+ stats.CreatedResourceMailboxes = tempStats.CreatedResourceMailboxes;
}
else
{
@@ -221,6 +224,9 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
stats.UsedArchingStorage += tempStats.UsedArchingStorage;
+
+ stats.CreatedSharedMailboxes += tempStats.CreatedSharedMailboxes;
+ stats.CreatedResourceMailboxes += tempStats.CreatedResourceMailboxes;
}
}
}
@@ -241,6 +247,9 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
+ stats.AllocatedSharedMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue;
+ stats.AllocatedResourceMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue;
+
return stats;
}
catch (Exception ex)
@@ -1665,8 +1674,21 @@ namespace WebsitePanel.EnterpriseServer
// check mailbox quota
OrganizationStatistics orgStats = GetOrganizationStatistics(itemId);
- if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
- return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
+ if (accountType == ExchangeAccountType.SharedMailbox)
+ {
+ if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes))
+ return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
+ }
+ else if (accountType == ExchangeAccountType.ResourceMailbox)
+ {
+ if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes))
+ return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
+ }
+ else
+ {
+ if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
+ return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
+ }
// place log record
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs
index 88b0ac93..23ff9cf6 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs
@@ -39,7 +39,8 @@ namespace WebsitePanel.Providers.HostedSolution
Equipment = 6,
User = 7,
SecurityGroup = 8,
- DefaultSecurityGroup = 9
-
+ DefaultSecurityGroup = 9,
+ SharedMailbox = 10,
+ ResourceMailbox = 11
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs
index b8189f82..6d15b8e2 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs
@@ -341,6 +341,36 @@ namespace WebsitePanel.Providers.HostedSolution
get { return usedArchingStorage; }
set { usedArchingStorage = value; }
}
+
+ int allocatedSharedMailboxes;
+ public int AllocatedSharedMailboxes
+ {
+ get { return allocatedSharedMailboxes; }
+ set { allocatedSharedMailboxes = value; }
+ }
+
+ int createdSharedMailboxes;
+ public int CreatedSharedMailboxes
+ {
+ get { return createdSharedMailboxes; }
+ set { createdSharedMailboxes = value; }
+ }
+
+ int allocatedResourceMailboxes;
+ public int AllocatedResourceMailboxes
+ {
+ get { return allocatedResourceMailboxes; }
+ set { allocatedResourceMailboxes = value; }
+ }
+
+ int createdResourceMailboxes;
+ public int CreatedResourceMailboxes
+ {
+ get { return createdResourceMailboxes; }
+ set { createdResourceMailboxes = value; }
+ }
+
+
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs
index f318fe29..efb94b97 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs
@@ -1942,6 +1942,11 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("Equipment");
else if (accountType == ExchangeAccountType.Room)
cmd.Parameters.Add("Room");
+ else if (accountType == ExchangeAccountType.SharedMailbox)
+ cmd.Parameters.Add("Shared");
+ else if (accountType == ExchangeAccountType.ResourceMailbox)
+ cmd.Parameters.Add("Equipment");
+
result = ExecuteShellCommand(runSpace, cmd);
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs
index fbb33f3a..c39bdbe0 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs
@@ -369,6 +369,10 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("Equipment");
else if (accountType == ExchangeAccountType.Room)
cmd.Parameters.Add("Room");
+ else if (accountType == ExchangeAccountType.SharedMailbox)
+ cmd.Parameters.Add("Shared");
+ else if (accountType == ExchangeAccountType.ResourceMailbox)
+ cmd.Parameters.Add("Equipment");
result = ExecuteShellCommand(runSpace, cmd);
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
index 7508ff20..e55192d1 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
@@ -5593,7 +5593,16 @@
Error creating rds collection. You need to add at least 1 rds server to collection
-
- Error deleting rds server from organization: server is used in rds collection
+
+ Resource Mailboxes per Organization
+
+
+ Shared Mailboxes per Organization
+
+
+ (resource mailbox)
+
+
+ (shared mailbox)
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx
index a00e1a83..bf6cdd21 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx
@@ -186,4 +186,10 @@
*
+
+ Resource Mailbox
+
+
+ Shared Mailbox
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
index b91a1f73..68da7689 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
@@ -101,6 +101,20 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
+ if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_SHAREDMAILBOXES))
+ {
+ if (cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue != 0)
+ rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("SharedMailbox.Text"), "10"));
+
+ }
+
+ if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES))
+ {
+ if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0)
+ rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("ResourceMailbox.Text"), "11"));
+
+ }
+
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs
index d79d614f..39541c59 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs
@@ -183,6 +183,12 @@ namespace WebsitePanel.Portal.ExchangeServer
}
imgVipUser.Visible = account.IsVIP && Cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
+ if (account.AccountType == ExchangeAccountType.SharedMailbox)
+ litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
+
+ if (account.AccountType == ExchangeAccountType.ResourceMailbox)
+ litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text");
+
}
catch (Exception ex)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs
index 171f26cd..ae3449bf 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs
@@ -67,6 +67,16 @@ namespace WebsitePanel.Portal.ExchangeServer
litDisplayName.Text = mailbox.DisplayName;
sendAsPermission.SetAccounts(mailbox.SendAsAccounts);
fullAccessPermission.SetAccounts(mailbox.FullAccessAccounts);
+
+ // get account meta
+ ExchangeAccount account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, PanelRequest.AccountID);
+
+ if (account.AccountType == ExchangeAccountType.SharedMailbox)
+ litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
+
+ if (account.AccountType == ExchangeAccountType.ResourceMailbox)
+ litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text");
+
}
catch (Exception ex)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx
index 40852b11..47b87af2 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx
@@ -25,6 +25,9 @@