问题描述
我正在尝试为Linux VPS生成一个简单的Python脚本,这将允许我接收邮件(然后我可以在python中进行操作,比如打印到stdout)。没有比这更复杂。我不想使用沉重的解决方案或服务器程序,我只是在一个简单的python脚本,我可以运行,并且能够接收邮件。
Pythons的smtpd模块能否满足此任务?到目前为止,我听到有冲突的意见。如果没有,你还会建议什么?也许你已经把你自己的代码搞到一起了?
在这个阶段,即使像lamson这样的项目似乎太重了(尽管如果找不到更好的解决方案,这可能是不可避免的)。
Pythons smtpd是足够的。
请查看和
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电子邮件(接收)服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!