Initial project's source code check-in.

This commit is contained in:
ptsurbeleu 2011-07-13 16:07:32 -07:00
commit b03b0b373f
4573 changed files with 981205 additions and 0 deletions

View file

@ -0,0 +1,83 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections;
namespace WebsitePanel.Providers.Mail
{
public interface IMailServer
{
// mail domains
bool DomainExists(string domainName);
string[] GetDomains();
MailDomain GetDomain(string domainName);
void CreateDomain(MailDomain domain);
void UpdateDomain(MailDomain domain);
void DeleteDomain(string domainName);
// mail aliases
bool DomainAliasExists(string domainName, string aliasName);
string[] GetDomainAliases(string domainName);
void AddDomainAlias(string domainName, string aliasName);
void DeleteDomainAlias(string domainName, string aliasName);
// mailboxes
bool AccountExists(string mailboxName);
MailAccount[] GetAccounts(string domainName);
MailAccount GetAccount(string mailboxName);
void CreateAccount(MailAccount mailbox);
void UpdateAccount(MailAccount mailbox);
void DeleteAccount(string mailboxName);
//forwardings (mail aliases)
bool MailAliasExists(string mailAliasName);
MailAlias[] GetMailAliases(string domainName);
MailAlias GetMailAlias(string mailAliasName);
void CreateMailAlias(MailAlias mailAlias);
void UpdateMailAlias(MailAlias mailAlias);
void DeleteMailAlias(string mailAliasName);
// groups
bool GroupExists(string groupName);
MailGroup[] GetGroups(string domainName);
MailGroup GetGroup(string groupName);
void CreateGroup(MailGroup group);
void UpdateGroup(MailGroup group);
void DeleteGroup(string groupName);
// mailing lists
bool ListExists(string maillistName);
MailList[] GetLists(string domainName);
MailList GetList(string maillistName);
void CreateList(MailList maillist);
void UpdateList(MailList maillist);
void DeleteList(string maillistName);
}
}

View file

@ -0,0 +1,202 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
[Serializable]
public class MailAccount : ServiceProviderItem
{
private bool enabled;
private string password;
private string replyTo;
private bool responderEnabled;
private string responderSubject;
private string responderMessage;
private string firstName; // SM
private string lastName; // SM
private bool deleteOnForward;
private string[] forwardingAddresses;
private string signature;
private bool passwordLocked;
private int maxMailboxSize;
private bool changePassword;
private bool isDomainAdmin;
private bool isDomainAdminEnabled;
private bool retainLocalCopy;
private bool signatureEnabled;
private string signatureHTML;
/// <summary>
///
/// </summary>
public bool UnlimitedSize
{
get
{
return (maxMailboxSize < 0);
}
}
public string ReplyTo
{
get { return this.replyTo; }
set { this.replyTo = value; }
}
public string ResponderSubject
{
get { return this.responderSubject; }
set { this.responderSubject = value; }
}
public string ResponderMessage
{
get { return this.responderMessage; }
set { this.responderMessage = value; }
}
public bool ResponderEnabled
{
get { return this.responderEnabled; }
set { this.responderEnabled = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
[Persistent]
public string Password
{
get { return this.password; }
set { this.password = value; }
}
#region SmarterMail
/// <summary>
/// First Name
/// </summary>
public string FirstName
{
get { return firstName; }
set { firstName = value; }
}
/// <summary>
/// Last name
/// </summary>
public string LastName
{
get { return lastName; }
set { lastName = value; }
}
public bool DeleteOnForward
{
get { return deleteOnForward; }
set { deleteOnForward = value; }
}
public string[] ForwardingAddresses
{
get { return forwardingAddresses; }
set { forwardingAddresses = value; }
}
public string Signature
{
get { return signature; }
set { signature = value; }
}
public bool IsDomainAdminEnabled
{
get { return isDomainAdminEnabled; }
set { isDomainAdminEnabled = value; }
}
public bool IsDomainAdmin
{
get { return isDomainAdmin; }
set { isDomainAdmin = value; }
}
public bool PasswordLocked
{
get { return passwordLocked; }
set { passwordLocked = value; }
}
public int MaxMailboxSize
{
get { return maxMailboxSize; }
set { maxMailboxSize = value; }
}
public bool ChangePassword
{
get { return changePassword; }
set { changePassword = value; }
}
#endregion
#region MDaemon
public bool RetainLocalCopy
{
get { return retainLocalCopy; }
set { retainLocalCopy = value; }
}
#endregion
#region hMail
public bool SignatureEnabled
{
get { return signatureEnabled; }
set { signatureEnabled = value; }
}
public string SignatureHTML
{
get { return signatureHTML; }
set { signatureHTML = value; }
}
#endregion
}
}

View file

@ -0,0 +1,47 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
/// <summary>
/// Summary description for MailForwardingItem.
/// </summary>
[Serializable]
public class MailAlias : MailAccount
{
private string forwardTo;
public string ForwardTo
{
get { return this.forwardTo; }
set { this.forwardTo = value; }
}
}
}

View file

@ -0,0 +1,369 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
[Serializable]
public class MailDomain : ServiceProviderItem
{
#region Smarter Mail 5.x String Constants
//Domain Features
public const string SMARTERMAIL5_SHOW_DOMAIN_REPORTS = "ShowDomainReports";
public const string SMARTERMAIL5_SHOW_CALENDAR = "ShowCalendar";
public const string SMARTERMAIL5_SHOW_CONTACTS = "ShowContacts";
public const string SMARTERMAIL5_SHOW_TASKS = "ShowTasks";
public const string SMARTERMAIL5_SHOW_NOTES = "ShowNotes";
public const string SMARTERMAIL5_POP_RETRIEVAL = "ShowCalendar";
public const string SMARTERMAIL5_POP_RETREIVAL_ENABLED = "EnablePopRetreival";
public const string SMARTERMAIL5_CATCHALLS_ENABLED = "EnableCatchAlls";
//Domain Throttling
public const string SMARTERMAIL5_MESSAGES_PER_HOUR = "MessagesPerHour";
public const string SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED = "MessagesPerHourEnabled";
public const string SMARTERMAIL5_BANDWIDTH_PER_HOUR = "BandwidthPerHour";
public const string SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED = "BandwidthPerHourEnabled";
public const string SMARTERMAIL5_BOUNCES_PER_HOUR = "BouncesReceivedPerHour";
public const string SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED = "BouncesPerHourEnabled";
//Domain Limits
public const string SMARTERMAIL5_POP_RETREIVAL_ACCOUNTS = "PopRetreivalAccounts";
#endregion
#region Smarter Mail 6.x String Constants
//Domain Features
public const string SMARTERMAIL6_IMAP_RETREIVAL_ENABLED = "EnableImapRetreival";
public const string SMARTERMAIL6_MAIL_SIGNING_ENABLED = "EnableMailSigning";
public const string SMARTERMAIL6_EMAIL_REPORTS_ENABLED = "EnableEmailReports";
public const string SMARTERMAIL6_SYNCML_ENABLED = "EnableSyncML";
#endregion
//license type
public const string SMARTERMAIL_LICENSE_TYPE = "LicenseType";
private string[] blackList = new string[0];
private string redirectionHosts;
private bool redirectionActive;
private bool enabled;
private string postmasterAccount;
private string catchAllAccount;
private string abuseAccount;
private int maxPopRetrievalAccounts;
public string RedirectionHosts
{
get { return this.redirectionHosts; }
set { this.redirectionHosts = value; }
}
public string[] BlackList
{
get { return this.blackList; }
set { this.blackList = value; }
}
public string CatchAllAccount
{
get { return this.catchAllAccount; }
set { this.catchAllAccount = value; }
}
public string AbuseAccount
{
get { return this.abuseAccount; }
set { this.abuseAccount = value; }
}
public bool RedirectionActive
{
get { return this.redirectionActive; }
set { this.redirectionActive = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public string PostmasterAccount
{
get { return this.postmasterAccount; }
set { this.postmasterAccount = value; }
}
#region SmarterMail
private string primaryDomainAdminUserName;
private string primaryDomainAdminPassword;
private string primaryDomainAdminFirstName;
private string primaryDomainAdminLastName;
private string serverIP;
private string path;
private int imapPort = 143;
private int popPort = 110;
private int smtpPort = 25;
private int smtpPortAlt;
private int ldapPort;
private int maxAliases;
private int maxDomainAliases;
private int maxLists;
private int maxDomainSizeInMB;
private int maxDomainUsers;
private int maxMailboxSizeInMB;
private int maxMessageSize;
private int maxRecipients;
private bool requireSmtpAuthentication;
private string listCommandAddress = "";
private bool isGlobalAddressList;
private bool sharedContacts;
private bool sharedNotes;
private bool sharedCalendars;
private bool sharedFolders;
private bool sharedTasks;
private bool bypassForwardBlackList;
private bool showstatsmenu;
private bool showspammenu;
private bool showlistmenu;
private bool showdomainaliasmenu;
private bool showcontentfilteringmenu;
public bool ShowsStatsMenu
{
get { return showstatsmenu; }
set { showstatsmenu = value; }
}
public bool ShowSpamMenu
{
get { return showspammenu; }
set { showspammenu = value; }
}
public bool ShowListMenu
{
get { return showlistmenu; }
set { showlistmenu = value; }
}
public bool ShowDomainAliasMenu
{
get { return showdomainaliasmenu; }
set { showdomainaliasmenu = value; }
}
public bool ShowContentFilteringMenu
{
get { return showcontentfilteringmenu; }
set { showcontentfilteringmenu = value; }
}
public bool BypassForwardBlackList
{
get { return bypassForwardBlackList; }
set { bypassForwardBlackList = value; }
}
public bool IsGlobalAddressList
{
get { return isGlobalAddressList; }
set { isGlobalAddressList = value; }
}
public bool SharedContacts
{
get { return sharedContacts; }
set { sharedContacts = value; }
}
public bool SharedNotes
{
get { return sharedNotes; }
set { sharedNotes = value; }
}
public bool SharedCalendars
{
get { return sharedCalendars; }
set { sharedCalendars = value; }
}
public bool SharedFolders
{
get { return sharedFolders; }
set { sharedFolders = value; }
}
public bool SharedTasks
{
get { return sharedTasks; }
set { sharedTasks = value; }
}
public string PrimaryDomainAdminUserName
{
get { return primaryDomainAdminUserName; }
set { primaryDomainAdminUserName = value; }
}
public string PrimaryDomainAdminPassword
{
get { return primaryDomainAdminPassword; }
set { primaryDomainAdminPassword = value; }
}
public string PrimaryDomainAdminFirstName
{
get { return primaryDomainAdminFirstName; }
set { primaryDomainAdminFirstName = value; }
}
public string PrimaryDomainAdminLastName
{
get { return primaryDomainAdminLastName; }
set { primaryDomainAdminLastName = value; }
}
public string ServerIP
{
get { return serverIP; }
set { serverIP = value; }
}
public string Path
{
get { return path; }
set { path = value; }
}
public int SmtpPortAlt
{
get { return smtpPortAlt; }
set { smtpPortAlt = value; }
}
public int LdapPort
{
get { return ldapPort; }
set { ldapPort = value; }
}
public int ImapPort
{
get { return imapPort; }
set { imapPort = value; }
}
public int PopPort
{
get { return popPort; }
set { popPort = value; }
}
public int SmtpPort
{
get { return smtpPort; }
set { smtpPort = value; }
}
public int MaxAliases
{
get { return maxAliases; }
set { maxAliases = value; }
}
public int MaxDomainAliases
{
get { return maxDomainAliases; }
set { maxDomainAliases = value; }
}
public int MaxLists
{
get { return maxLists; }
set { maxLists = value; }
}
public int MaxDomainSizeInMB
{
get { return maxDomainSizeInMB; }
set { maxDomainSizeInMB = value; }
}
public int MaxDomainUsers
{
get { return maxDomainUsers; }
set { maxDomainUsers = value; }
}
public int MaxMailboxSizeInMB
{
get { return maxMailboxSizeInMB; }
set { maxMailboxSizeInMB = value; }
}
public int MaxMessageSize
{
get { return maxMessageSize; }
set { maxMessageSize = value; }
}
public int MaxRecipients
{
get { return maxRecipients; }
set { maxRecipients = value; }
}
public int MaxPopRetrievalAccounts
{
get { return maxPopRetrievalAccounts; }
set { maxPopRetrievalAccounts = value; }
}
public bool RequireSmtpAuthentication
{
get { return requireSmtpAuthentication; }
set { requireSmtpAuthentication = value; }
}
public string ListCommandAddress
{
get { return listCommandAddress; }
set { listCommandAddress = value; }
}
#endregion
}
}

View file

@ -0,0 +1,70 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
/// <summary>
/// Summary description for MailboxRights.
/// </summary>
public enum ReplyTo
{
RepliesToList = 0,
RepliesToSender = 1,
RepliesToModerator = 2
}
#region MailEnable
public enum PostingMode
{
MembersCanPost = 0,
AnyoneCanPost = 1,
PasswordProtectedPosting = 2,
ModeratorCanPost = 3
}
public enum PrefixOption
{
Default = 0,
Altered = 1,
CustomPrefix = 2
}
#endregion
#region Merak
public enum PasswordProtection
{
NoProtection = 0,
ClientModerated = 1,
ServerModerated = 2
}
#endregion
}

View file

@ -0,0 +1,58 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
/// <summary>
/// Summary description for MailGroupItem.
/// </summary>
[Serializable]
public class MailGroup : ServiceProviderItem
{
private string[] members = new string[0];
private bool enabled;
public MailGroup()
{
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public string[] Members
{
get { return this.members; }
set { this.members = value; }
}
}
}

View file

@ -0,0 +1,284 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
[Serializable]
public class MailList : ServiceProviderItem
{
private string[] members = new string[0];
private string description;
private string textHeader;
private string textFooter;
private string htmlHeader;
private string htmlFooter;
private bool moderated;
private bool enabled;
private string moderatorAddress;
private ReplyTo replyToMode;
private PostingMode postingMode;
private string password;
private string subjectPrefix = "";
private int maxMessageSize;
private int maxRecipientsPerMessage;
private string listToAddress;
private string listFromAddress;
private string listReplytoAddress;
private bool digestmode;
private bool sendsubscribe;
private bool sendunsubscribe;
private bool allowunsubscribe;
private bool disablelistcommand;
private bool disablesubscribecommand;
public int MaxMessageSize
{
get { return maxMessageSize; }
set { maxMessageSize = value; }
}
public int MaxRecipientsPerMessage
{
get { return maxRecipientsPerMessage; }
set { maxRecipientsPerMessage = value; }
}
public string Description
{
get { return this.description; }
set { this.description = value; }
}
public string TextHeader
{
get { return this.textHeader; }
set { this.textHeader = value; }
}
public string TextFooter
{
get { return this.textFooter; }
set { this.textFooter = value; }
}
public string HtmlHeader
{
get { return this.htmlHeader; }
set { this.htmlHeader = value; }
}
public string HtmlFooter
{
get { return this.htmlFooter; }
set { this.htmlFooter = value; }
}
public string ModeratorAddress
{
get { return this.moderatorAddress; }
set { this.moderatorAddress = value; }
}
public PostingMode PostingMode
{
get { return this.postingMode; }
set { this.postingMode = value; }
}
public ReplyTo ReplyToMode
{
get { return this.replyToMode; }
set { this.replyToMode = value; }
}
public bool Moderated
{
get { return this.moderated; }
set { this.moderated = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
[Persistent]
public string Password
{
get { return this.password; }
set { this.password = value; }
}
public string[] Members
{
get { return this.members; }
set { this.members = value; }
}
public string SubjectPrefix
{
get { return subjectPrefix; }
set { subjectPrefix = value; }
}
#region SmarterMail
private bool enableSubjectPrefix;
private bool requirePassword;
public bool EnableSubjectPrefix
{
get { return enableSubjectPrefix; }
set { enableSubjectPrefix = value; }
}
public bool RequirePassword
{
get { return requirePassword; }
set { requirePassword = value; }
}
public string ListToAddress
{
get { return listToAddress; }
set { listToAddress = value; }
}
public string ListFromAddress
{
get { return listFromAddress; }
set { listFromAddress = value; }
}
public string ListReplyToAddress
{
get { return listReplytoAddress; }
set { listReplytoAddress = value; }
}
public bool DigestMode
{
get { return digestmode; }
set { digestmode = value; }
}
public bool SendSubscribe
{
get { return sendsubscribe; }
set { sendsubscribe = value; }
}
public bool SendUnsubscribe
{
get { return sendunsubscribe; }
set { sendunsubscribe = value; }
}
public bool AllowUnsubscribe
{
get { return allowunsubscribe; }
set { allowunsubscribe = value; }
}
public bool DisableListcommand
{
get { return disablelistcommand; }
set { disablelistcommand = value; }
}
public bool DisableSubscribecommand
{
get { return disablesubscribecommand; }
set { disablesubscribecommand = value; }
}
#endregion
#region MailEnable
private int attachHeader;
private int attachFooter;
private PrefixOption prefixOption;
public int AttachHeader
{
get { return this.attachHeader; }
set { this.attachHeader = value; }
}
public int AttachFooter
{
get { return this.attachFooter; }
set { this.attachFooter = value; }
}
public PrefixOption PrefixOption
{
get { return this.prefixOption; }
set { this.prefixOption = value;}
}
#endregion
#region Merak
private bool maxMessageSizeEnabled;
private PasswordProtection passwordProtection;
public bool MaxMessageSizeEnabled
{
get { return maxMessageSizeEnabled; }
set { maxMessageSizeEnabled = value;}
}
public PasswordProtection PasswordProtection
{
get { return passwordProtection;}
set { passwordProtection = value; }
}
#endregion
#region hMailServer
private bool requireSmtpAuthentication;
public bool RequireSmtpAuthentication
{
get { return requireSmtpAuthentication; }
set { requireSmtpAuthentication = value; }
}
#endregion
}
}