diff --git a/SolidCP/Sources/SolidCP.Providers.Base/Mail/MailAlias.cs b/SolidCP/Sources/SolidCP.Providers.Base/Mail/MailAlias.cs index 8ca13af6..3a6843d2 100644 --- a/SolidCP/Sources/SolidCP.Providers.Base/Mail/MailAlias.cs +++ b/SolidCP/Sources/SolidCP.Providers.Base/Mail/MailAlias.cs @@ -41,11 +41,17 @@ namespace SolidCP.Providers.Mail public class MailAlias : MailAccount { private string forwardTo; - + private bool includealldomainusers; public string ForwardTo { get { return this.forwardTo; } set { this.forwardTo = value; } } - } + + public bool IncludeAllDomainUsers + { + get { return this.includealldomainusers; } + set { this.includealldomainusers = value; } + } + } } diff --git a/SolidCP/Sources/SolidCP.Providers.Mail.SmarterMail100/SmarterMail100.cs b/SolidCP/Sources/SolidCP.Providers.Mail.SmarterMail100/SmarterMail100.cs index abb20894..c4fd7dfc 100644 --- a/SolidCP/Sources/SolidCP.Providers.Mail.SmarterMail100/SmarterMail100.cs +++ b/SolidCP/Sources/SolidCP.Providers.Mail.SmarterMail100/SmarterMail100.cs @@ -1469,8 +1469,10 @@ public MailAlias[] GetMailAliases(string domainName) } } + mailAlias.IncludeAllDomainUsers = alias["includeAllDomainUsers"]; - if(members.ToArray().Length == 1) + + if (members.ToArray().Length == 1 && mailAlias.IncludeAllDomainUsers == false) { Log.WriteInfo("GetMailAliases - Found {0}", alias["name"].ToString()); mailAlias.ForwardTo = alias["targets"][0].ToString(); @@ -1662,7 +1664,9 @@ public MailGroup[] GetGroups(string domainName) } } - if (members.ToArray().Length != 1) + mailGroup.IncludeAllDomainUsers = alias["includeAllDomainUsers"]; + + if (members.ToArray().Length != 1 || mailGroup.IncludeAllDomainUsers == true) { mailGroup.Members = members.ToArray(); groups.Add(mailGroup);