Uncategorized

Is it better to be Apache or Rails?

I had forgotten how few people actually understand email, and honestly how complicated it is when you’re coming to it just understanding an email client and maybe a web browser. Even if you understand programming.

Firstly there’s the SMTP protocol, which people don’t understand is a chatty back and forth protocol with possible errors and results at each stage.

Then there’s the matter of relaying or whether you should accept email or not. To do that in Haraka you need to have a plugin determine it – but people used to coding for web servers get confused by that.

Then there’s the matter of the contents of the email itself – it’s all reasonably easy with non-MIME emails, but it gets complicated FAST with MIME emails.

I’ve not coded around any of this in Haraka – a lot of Haraka is a straight interface to SMTP itself, and even the email parser maintains the MIME structure so you have to walk down the child nodes sometimes to get at the message body. This is confusing for people that don’t understand multi-part MIME.

I’m not sure what the right level is here to aim at. If you write Apache modules they assume you understand HTTP, but if you code in Rails you really don’t have to understand much at all. Should Haraka be the Apache or the Rails?

Standard

6 thoughts on “Is it better to be Apache or Rails?

  1. Both.

    Rails before 3 was just that: It even kept you from playing with the low-level bits unless you wanted to hack into the stack.

    But rack and Rails3 changed things a lot. Now you can tap into the stack at the low point or the high point.

    • It’s sort of why I supply lots of plugins already with Haraka – they can do low level stuff if they want to, but just basically receiving email “Just Works” too.

      However this recent experience got me thinking that people want an API that hides them away from smtp/email altogether. But it’s just one experience, not statistically significant, yet.

      • Exactly. I think that’s very much needed: At one level, people want “Send this message” “receive messages here”

        At another, people want “Send this message. Was it accepted?” “Receive messages. Were there errors?”

        At another, people want “pipe mail from x to y, deliver from w to z, spam scan, do all sorts of stuff.”

    • [posting as a reply to the top level because WordPress won’t let me thread that deep]

      Yeah. All of that is possible now, but maybe it just requires a bit too much understanding of SMTP.

      Partly though I think there’s room for someone else to code some sort of cool API on top of Haraka – much like people coded Rails on top of HTTP servers. Open source projects are partly about scratching your own itch, and Haraka does that for me. But if I get a lot more questions about how to do things that are really simple with Haraka (really, the last set of approx 50 questions resulted in a really trivial plugin) then I either need to rethink the API, or rethink the documentation (though the docs are a work in progress, obv).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s