Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / C#

MDaemon Controler for .NET

Rate me:
Please Sign up or sign in to vote.
4.65/5 (9 votes)
19 Feb 2010CPOL2 min read 77.2K   1.3K   20  
This .NET class allows to administrate the MDaemon Mail server, like creating domains and user accounts.
#pragma once
#include "MDUserImports.h"

using namespace System;
using namespace System::Collections;

namespace MDaemon
{
	public __gc class cDomain
	{
	public:
		[FlagsAttribute]
		__value enum eFlags : Int32
		{
			BIND        = MDDM_BIND,
			RECURSEIMAP = MDDM_RECURSEIMAP,
			ANTIVIRUS   = MDDM_ANTIVIRUS,
			ANTISPAM    = MDDM_ANTISPAM
		};

		cDomain();
		void Create();
		void Load(String* s_Domain);
		
		// STATIC:
		static void Delete(String* s_Domain);
		static ArrayList* GetAllDomains();

		// -------------------------------------
		String* DomainName;
		String* FQDN;
		String* IP;
		int     MaxInactive;
		int     MaxMessageAge;
		int     MaxDeletedIMAPMessageAge;
		int     POP_Throttle;
		int     IMAP_Throttle;
		int     MultiPOP_Throttle;
		int     DomainPOP_Throttle;
		int     InboundSMTP_Throttle;
		int     OutboundSMTP_Throttle;
		eFlags  Flags;
		int     MaxUsers;
		int     MaxLists;
		// -------------------------------------

	private:
		void CopyToManaged  (MD_Domain* pk_Domain);
		void CopyFromManaged(MD_Domain* pk_Domain);
		void VerifyData     (MD_Domain* pk_Domain);
	};
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) ElmüSoft
Chile Chile
Software Engineer since 40 years.

Comments and Discussions