对于我来说,学习创建电子邮件服务器的良好起点是什么?
基本上,我想要做的是让一个服务器(例如 foo.com)为我接收邮件,因此如果我将电子邮件发送到 ([电子邮件受保护])它会将电子邮件内容转储到 /mail/blah/subject 中,然后将其发送到我的真实电子邮件帐户。
我希望将其作为编程练习,因此 RFC 等的链接会很好。重新发明轮子是了解轮子的好方法。
编辑:请随意适当地重新标记。
What would be a good starting point for me to learn about creating an email server?
Basically, what I want to do is have a server (such as foo.com) recieving mail for me so if I send an email to ([email protected]) it will dump the contents of the email into /mail/blah/subject and then send it off to my REAL email account.
I'm looking to do this as a programming exercise, so links to RFCs, etc. would be nice. Reinventing the wheel is a good way to learn about wheels.
EDIT: Feel free to retag this appropriately.
发布评论
评论(1)
编辑:我提供了一些标题并按主题划分了 RFC。我希望现在更容易访问。这是一个相当大的列表,我希望我能更好地格式化它,但不幸的是,仅此而已。
既然您提到您并不真正知道自己需要什么,那么让我澄清一下:
如果您只想实现一个位于 MUA(电子邮件客户端)和“真实”服务器之间的简单“代理”服务器,您可以可能只需要实现基本的 SMTP 功能就可以逃脱惩罚。这将允许您发送邮件,即向 MTA 提交邮件。
POP3 用于电子邮件客户端从服务器上拉取消息,而 IMAP 是 POP3 的替代方案,具有一些不同的功能集,主要提供在线或离线模式,可以视为管理远程文件夹(即邮箱) )。
MIME 指定存在多部分消息、附件等的电子邮件内容的格式。
互联网消息格式(还定义电子邮件地址格式)
http ://www.faqs.org/rfcs/rfc822.html
http://www .faqs.org/rfcs/rfc2822.html
SMTP:
http://www.faqs.org/rfcs/rfc821.html
更新 SMTP/RF821:
http://www.faqs.org/rfcs/rfc5321.html
SMTP-AUTH:
http://www.faqs.org/rfcs/rfc2554.html
消息提交(即申请充当 MUA):
http://www.faqs.org/rfcs/rfc2476.html< /a>
IMAPv4:
http://www.faqs.org/rfcs /rfc1730.html
IMAPv4rev1:
http://www. faqs.org/rfcs/rfc2060.html
POP3:
http ://www.faqs.org/rfcs/rfc1081.html
http://www .faqs.org/rfcs/rfc1939.html
http://www.faqs.org /rfcs/rfc1957.html
POP3 扩展:
http:// /www.faqs.org/rfcs/rfc2449.html
POP/IMAP 授权:
http://www.faqs.org/rfcs/rfc2195.html
POP3 和 IMAP 的 TLS:
http://www.faqs.org/rfcs/rfc2595.html
POP3 的验证响应代码:
< a href="http://www.faqs.org/rfcs/rfc3206.html" rel="noreferrer">http://www.faqs.org/rfcs/rfc3206.html
POP3 简单身份验证:
http://www.faqs.org/rfcs/rfc5034.html
MIME,由 5 个 RFC 组成:
http://www .faqs.org/rfcs/rfc2045.html
http://www.faqs.org /rfcs/rfc2046.html
http://www.faqs.org/rfcs/rfc2047 .html
http://www.faqs.org/rfcs/rfc4288.html
http://www.faqs.org/rfcs/rfc4289.html
http://www.faqs.org/rfcs/rfc2049.html
Edit: I provided some headings and divided RFCs by topic. I hope it's more accessible now. It's quite a list, and I wish I could format it any better, but unfortunately, that's about it.
Since you mentioned you don't really know what you need, let me clarify:
If you only want to implement a simple "proxy" server that sits in between your MUA (email client) and "real" server, you can probably get away with only implementing basic SMTP functionality. This will allow you to send messages, i.e. to submit messages to an MTA.
POP3 is for email clients to pull messages off of your server, while IMAP is an alternative to POP3 with a somewhat different feature set, mainly providing an on- or offline mode which can be thought of like managing remote folders (i.e. mailboxes).
MIME specifies the format of the contents of e-mail messages in presence of multi-part messages, attachments etc.
Internet Message format (also defines e-mail address format)
http://www.faqs.org/rfcs/rfc822.html
http://www.faqs.org/rfcs/rfc2822.html
SMTP:
http://www.faqs.org/rfcs/rfc821.html
Update to SMTP/RF821:
http://www.faqs.org/rfcs/rfc5321.html
SMTP-AUTH:
http://www.faqs.org/rfcs/rfc2554.html
Message submission (i.e. for the application to be acting as a MUA):
http://www.faqs.org/rfcs/rfc2476.html
IMAPv4:
http://www.faqs.org/rfcs/rfc1730.html
IMAPv4rev1:
http://www.faqs.org/rfcs/rfc2060.html
POP3:
http://www.faqs.org/rfcs/rfc1081.html
http://www.faqs.org/rfcs/rfc1939.html
http://www.faqs.org/rfcs/rfc1957.html
POP3 extensions:
http://www.faqs.org/rfcs/rfc2449.html
Authorization for POP/IMAP:
http://www.faqs.org/rfcs/rfc2195.html
TLS for POP3 and IMAP:
http://www.faqs.org/rfcs/rfc2595.html
AUTH-RESP-CODE for POP3:
http://www.faqs.org/rfcs/rfc3206.html
POP3 simple authentification:
http://www.faqs.org/rfcs/rfc5034.html
MIME, which is composed of 5 RFCs:
http://www.faqs.org/rfcs/rfc2045.html
http://www.faqs.org/rfcs/rfc2046.html
http://www.faqs.org/rfcs/rfc2047.html
http://www.faqs.org/rfcs/rfc4288.html
http://www.faqs.org/rfcs/rfc4289.html
http://www.faqs.org/rfcs/rfc2049.html