Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Python Email (receiving) server

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).

like image 610
64bit_twitchyliquid Avatar asked Jun 01 '12 12:06

64bit_twitchyliquid


Video Answer


1 Answers

Pythons smtpd is sufficient.

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

like image 132
mfussenegger Avatar answered Sep 21 '22 11:09

mfussenegger