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 mor
Pythons smtpd is sufficient.
You might also want to take a look at inbox.py and this example
Yes SMTPD Module will be help full. Example code is here:
import smtpd import asyncore class CustomSMTPServer(smtpd.SMTPServer): def process_message(self, peer, mailfrom, rcpttos, data): print 'Receiving message from:', peer print 'Message addressed from:', mailfrom print 'Message addressed to :', rcpttos print 'Message length :', len(data) return server = CustomSMTPServer(('127.0.0.1', 1025), None) asyncore.loop()