开发者

Writing my own SMTP server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_JS百科

Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist

Closed 9 years ago.

Improve this question

I am writing a simple SMTP server and client. Server is in two parts receiver-SMTP and Sender SMTP. both will run in two different daemon services. The two modes this can run in is 'remote' and 'local'.

Since i am new to network programming I am having difficulty in even getting started. Any help in form of text, sample or skeleton code of an SMTP will help me a lot in clearing my doubts,


If your primary motive is to learn network programming and writing daemons, then I would recommend reading Beej's Guide to Network Programming and Advanced Programming in the Unix Environment. These don't provide straight up SMTP implementations but will give a good foundation to implement any protocol.


If you're set on writing this in C, start with this guide on network programming and sockets. Writing such a server isn't simple and requires a lot of background knowledge.

After you're a bit comfortable with sockets, install WireShark, some open-source SMTP server and try to send it some of the standard SMTP requests - seeing how it responds. This type of "exploration" is extremely valuable when implementing protocols.


The simple answer would be to google for open source smtp, try and find an existing project that is in the language you want to implement your own in, or in a language you can read and understand, and then work through the code to gain the understanding you need

Sites like sourceforge, freshmeat github, bitbucket will have projects on that will range from small to large. ou can also try some of the other repositories like PHPClasses, CPAN etc. (again depending on your language of choice).

You can also try open source search such as Krugle.

Another reference would be the SMTP RFC RFC 821 which will give you the standard you are writing to regardless of language.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜