TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What if SMTP and Sinatra Had a Baby?

54 pointsby BenjaminCoeover 13 years ago

6 comments

LeafStormover 13 years ago
The title ("SMTP and Sinatra") made me expect something written in Ruby. Also:<p><pre><code> def subscribe(self, route=r'subscribe-(?P&#60;name&#62;[^@]*)@.*'): </code></pre> No. No. No. No. No. No. <i>No.</i> Default arguments are <i>not</i> for specifying metadata about your functions. That's what decorators are for. And for the love of Guido, why are you accessing per-request information from instance variables? It seems to me that you would much rather be programming this in Ruby.
评论 #3281594 未加载
评论 #3282818 未加载
viraptorover 13 years ago
Isn't this pretty much what Lamson (<a href="http://lamsonproject.org/" rel="nofollow">http://lamsonproject.org/</a>) is aiming for?
评论 #3281383 未加载
jrockwayover 13 years ago
The quote from the ubuntu docs is bullshit. Setting up a mail server does require many different programs; an SMTP server, a spam filter, a virus scanner, procmail, an IMAP server, and SMTP server, and so on. But if you just want to play with SMTP, all you need is an SMTP server. And if you just want to play with email, all you need is a program that reads a message from STDIN and writes the result to STDOUT, because you can just run that from procmail.<p>Anyway, yes, a multi-user email service is not trivial to run. But email itself is pretty easy to work with, modulo RFC822, anyway :)
评论 #3281657 未加载
Titanousover 13 years ago
Mailman (my 2010 Ruby Summer of Code project) <i>is</i> Sinatra for incoming email: <a href="https://github.com/titanous/mailman" rel="nofollow">https://github.com/titanous/mailman</a>
评论 #3281671 未加载
评论 #3281621 未加载
评论 #3281623 未加载
评论 #3281686 未加载
inopinatusover 13 years ago
I do believe these kind of behaviours are what makes Mailgun sexy.
评论 #3281412 未加载
MostAwesomeDudeover 13 years ago
So, I couldn't help but notice that you wrote this:<p><pre><code> $ easy_install smtproutes </code></pre> I think there's a couple typos in there. For example, you could have spelled it this way:<p><pre><code> $ pip install smtproutes </code></pre> Using pip (<a href="http://pypi.python.org/pypi/pip" rel="nofollow">http://pypi.python.org/pypi/pip</a>) makes you a better ecosystem contributor. Also, I noticed you're internally using asyncore, AKA Medusa. This is a Bad Idea, period; you won't scale and you're using what is essentially dead, horrid code. Consider rewording the statement entirely:<p><pre><code> $ pip install Twisted $ twistd mail ... </code></pre> Now you have a <i>real</i> SMTP/POP3/IMAP server at your disposal.<p>But yeah, I'd so much rather that you not use asyncore. It makes us cry. I'd even let you keep easy_install if you compromise and drop asyncore!