214 points · by tosh · 8y ago · 52 comments
https://anvil.works/blog/email-driven-apps
(There's a video example at that link, where I build and deploy a Mailinator-like service from scratch in a couple of minutes.)
> Salmon is a fork of Lamson. [...] Lamson was relicensed under a BSD variant that was revokable. [...] I read that to mean that I could make a contribution but then have said work denied to me because the orginal author didn’t like the colour of my socks. So I went and found the latest version that was available under the GNU GPL version 3.
Does anybody know the backstory here?
The clause:
The copyright holder reserves the right to revoke this license on anyone who uses this copyrighted work at any time for any reason.
(Then again, it might mitigate the likelihood that a court would limita the licensors recovery after revocation based on the principle of promissory estoppel.)
If I had to guess, I'd guess that's why Salmon says it forked from a GPLv3 release of Lamson.
I would rather use non-free software than risk being sued just for being a user.
REVOKED!
well, unless you’re into that
Lamson isn't a perfect fit for the system, but it did make it easy to get started. Unfortunately it also had a number of bugs I had to fix, since the project was defunct. I should check to see if salmon needs those fixes.
My use case needs to save it to a database and make various decisions depending on the sate of the database (e.g., send notifications to anyone watching the ticket and update due dates for the support SLA). Since this database access is more efficient if the process stays connected to the database, it's better to have a long-lived process which handles mail as it comes in than to launch a new script on every incoming email.
Lamson serves as both the procmail side and the script side. It's a long-running process that routes the incoming email to the appropriate business logic internally. And since it's in Python, it's easy to integrate with our existing Django database and business logic. It's not perfect, but it works well enough that I'm not actively looking for a replacement.
I was evaluating it for the use case where I needed to receive emails, and then respond based on the user's position in a decision tree.
I worked on a system years ago that did this for FBL reports.
I have since switched over to aiosmtpd [1], a Python 3 based SMTP server using asyncio that was developed by Barry Warsaw and friends.
Is there any design documents? The stuff to explain the design, architecture, motivations, and intent.
Why!?
From the docs
The only bit I see that talks about something similar is, "Salmon is designed to sit _behind a traditional mail server_ in the same way a web application sits behind Apache or Nginx", emphasis is mine.
> Salmon is best deployed behind another mailserver such as Postfix or Sendmail - much in the same way as you host a WSGI application behind Apache or Nginx.
It is a combination of developers wanting to have cross platform end users, while also working around restrictions in place on corporate networks. It's been downhill since hotmail.
Node.js / Python both have very good support for http. Soap etc, run a web server for quick file serving from command line if you want. Dgraoh and other tools can easily be interfaced via http.
Why not leverage all that?