创建Python电子邮件(接收)服务器 [英] Creating Python Email (receiving) server

查看:177
本文介绍了创建Python电子邮件(接收)服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Linux VPS生成一个简单的Python脚本,这将允许我接收邮件(然后我可以在python中进行操作,比如打印到stdout)。没有比这更复杂。



我不想使用沉重的解决方案或服务器程序,我只是在一个简单的python脚本,我可以运行,并且能够接收邮件。



Pythons的smtpd模块能否满足此任务?到目前为止,我听到有冲突的意见。如果没有,你还会建议什么?也许你已经把你自己的代码搞到一起了?



在这个阶段,即使像lamson这样的项目似乎太重了(尽管如果找不到更好的解决方案,这可能是不可避免的)。

解决方案

Pythons smtpd是足够的。



请查看 inbox.py 这个例子


I am trying to produce a simple python script for a Linux VPS that will allow me to receive mail, (and then I can do stuff to it in python, like print it to stdout). Nothing more complex than that.

I don't want to use a 'heavy' solution or server program, I am really just after a simple python script that I can run, and is capable of receiving mail.

Will Pythons' smtpd module suffice for this task? I have heard conflicting opinions thus far. If not, what else would you suggest? Perhaps you have hacked together some code yourself?

At this stage, even projects like lamson seem too heavy (though this may be unavoidable if I cannot find a better solution).

解决方案

Pythons smtpd is sufficient.

You might also want to take a look at inbox.py and this example

这篇关于创建Python电子邮件(接收)服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆