Post a C # write email primary system source code

Source: Internet
Author: User
Tags comments contains ini mail reference thread versions root directory
Source code. NET TNT Email Server Tester Description



2004-11-9



First, the introduction

TNT Email server Tester is a beta version of an email server that supports multiple domain names. He implemented the SMTP/POP3 interface and basically implemented a small email server.

This tester version contains the source code for your reference.

Through testing, to propose changes to suggestions and comments, I will revise and give valuable comments to a set of distribution SDK.



Second, the SDK

TNT Email server tester itself is a small Email server, but the basic kernel functionality is based on Common.dll Server.dll. This beta and future releases will not contain the source code for the two core library files, but will release a set of reference development email server source code for everyone to learn to use the SDK.

Details about the SDK may not be available until my distribution is commercialized.

All developed based on C # development, My. NET Framework is v1.0.3705, but I believe it should work on the other 1.1 versions of the framework. I would appreciate it if something unusual happened and you could contact me in time.

To obtain a complete set of email servers, you are required to determine the following information:

1, the root directory of email

2, email pickup directory, that is, the local delivery of the pick up directory. Server.dll contains a service thread that monitors this directory and sends EML files in this directory.

3, the email queue directory, that is, eml queue buffer directory. Server.dll contains a service thread that monitors this directory and sends EML files in this directory. DISPSVC will send letters to the cemetery to store directories or outgoing mail directories based on EML file information in this directory.

4, email The Drop directory, that is, to determine the local mail storage directory, there will be system service threads from this directory to send eml files to a specific local user mailbox.

5, Email Outpost directory, that is, the need to send to the external storage directory of messages

6, determine the mailbox directory, that is, the user's mailbox storage

7, for the local domain name to establish a mailbox storage directory. Assuming that the current email server service domain name is abc.com, then you need to create a domain name directory on the mailbox directory abc.com, and then in this directory, the user directory mailbox directory and Userinfo.ini files. Let's say user name info

It's just that .... \mailbox\abc.com\info\mailbox\ Directory

And

File ... \mailbox\abc.com\info\userinfo.ini

The format of the Userinfo.ini is:

Username=info

password=*********

fwdlist=

Name=xxx

Creattime=2003-1-1

The Username= line indicates that the user name of this user's mailbox is stored, and password is clearly the user's password store. Future release versions consider MD5 encryption. Others are not important as retention extensions are needed.

8, in fact, the above need to determine the part of the Iserverinfo interface is defined. Each server requires two interfaces to function properly.

public interface Iserverinfo

{

<summary>

Gets the individual directory strings for the server, returning related configuration information through a constant index

Access through SVR_DIR_XXXX

</summary>

<returns> returns a string array of server directories that accesses constants accessed through common </returns>

String[] Serverdirectorys ();



<summary>

Get each domain name of the server, index 0 is the default domain name

Access through SVR_DOMAIN_XXXX

</summary>

<returns> return all domain names supported by the server </returns>

String[] Serverdomains ();



<summary>

Returns the server's settings for domain name and MX resolution

Access through SVR_DNS_XXXX

</summary>

<returns> return DNS server information ip</returns>

String[] Serverdnssetting ();



<summary>

The information included is: TCP timeout ...

Accessing SVR_RT_PARA_XXXX access through constants

</summary>

Int[] Serverruntimeparameters ();



<summary>

Returns the information returned in the server interaction

Access through SVR_REMSG_XXXX access

</summary>

String[] Serverreplymessage ();



<summary>

Returns the server-side settings string

Access through SVC_SETTING_XXXX

</summary>

String[] Serversetting ();

}

Many of the above interfaces return arrays, and in general, the array needs to be determined by the developer. A detailed reference example.

9, Ilog is a record of internal information interface, to help callers understand the occurrence of thread invocation information.

10. Test environment:

. NET Framework more than 1.0

Sufficient storage space and proper identification of the directory.





Iii. Feedback of comments

Please send feedback to the following email:

myjobsdk@yahoo.com.cn



Compressed files and engineering documents in:
Http://www.vchelp.net/ASP/cdf_pic/200410/subject_1_118575.zip




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.