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.


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.