SMTPRoutes - Python-powered SMTP server with Sinatra-style routes
A cool project from Benjamin E. Coe for SMTP using an elegant DSL in Python:
class ExampleRoute(Route):
@route(r'(?P<prefix>open)@(?P<suffix>.*)')
def open_route(self):
print "%s at %s sent the message: nn %s" % (
self.prefix,
self.suffix,
self.message
)
Messages are routed to methods in your class based upon rules in the @route
decorator. Routes can even specify sender authentication:
@route(r'(?P<prefix>spf)@(?P<suffix>.*)', sender_auth=SPFAuth)
Check the README for complete feature list and usage information.
Discussion
Sign in or Join to comment or subscribe