flak rss random

magical protection

As part of working on mailtanium, I wrote a basic webapp in Sinatra to check mail on my phone. Sinatra does all sorts of magic for you, as ruby frameworks are prone to do. It’s built on top of Rack, which also does magic things.

I wasn’t fully aware of this until I recently checked my logs and noticed a bunch of entries like this.
W, [2013-03-06T06:01:57.276947 #2149] WARN -- : attack prevented by Rack::Protection::HttpOrigin
Wowza, I’m under attack! No wait, on further inspection, I see one of those every time I send a POST request from my phone. Firefox on my laptop doesn’t seem to trigger it.

What’s happening? I’m not sure. From what I can make of the source for the module, the request should be blocked, but it’s not. Everything still works. The emails I tried to send were, in fact, sent. Maybe Rack’s default config is to only log a warning and not do anything drastic. But why then say the attack was prevented, instead of not prevented?

I think what I need is less magical protection and more protection from magic.

Posted 06 Mar 2013 19:40 by tedu Updated: 11 Apr 2013 21:34
Tagged: bugs mailtanium rants web

maitanium sync design

A critical feature for me was offline access. Not “I hope my IMAP client cached that email” offline access, but real “I can read any email, ever” offline access. The problem is that every client I’m familiar with that could do that basically worked locally. The price paid for offline access was single computer access. In theory, multiple desktops could fetch mail and process it, but the tags and filters would get out of sync. I don’t know anyone who has pulled this off. I needed to build a system where despite running independent clients against independent mail stores, the state of the universe would be kept roughly in sync.

more...

Posted 12 Apr 2012 03:45 by tedu Updated: 12 Apr 2012 03:45
Tagged: mailtanium

sinatra mime types

Sinatra (the ruby web app framework) has a handy method to indicate that the response is an attachment and should be saved: attachment filename. It even sets the content type correctly. Unless it can’t guess from the filename. Then it throws an unrecoverable error.

Discovered this little fact trying to download a .tgz file. The documentation says if I find a mime type Sinatra doesn’t understand, I’m supposed to run mime_type :tgz, 'application/octet-stream'. OK, great. So where’s the list of already known types? Never mind that, I’m really supposed to make up a list of every mime type I might want to download at some point and register them all up front? Insanity. In theory, I think rack is supposed to already be using a default of application/octet-stream, but it appears I’m just unlucky.

Posted 08 Apr 2012 02:40 by tedu Updated: 11 Apr 2013 21:34
Tagged: mailtanium rants software web

goodbye gmail

This post is rather delayed, since I quit using gmail almost a year ago, and the decision was made more than a year ago, but since I’m hopefully going to start writing about my post gmail adventures, I’ll start at the beginning.

Gmail was, for a time, pretty awesome. It was certainly an upgrade from pine in many respects. The ability to open attachments without bizarre scp contortions was a plus. I don’t really need to recount the virtues of gmail, but I was impressed with it for quite some time. First (and only, really) web app to replace a desktop app for me. But Eden was not to last.

Over time, I had a growing spam problem. No matter how many Chinese emails I flagged as spam over the course of five years, gmail was convinced that this was the day I woke up knowing Mandarin. Also, based on observed behavior, gmail whitelisted all emails with the word “lottery” in the subject. This was kind of a slow burn pain.

Also, the filtering options were kind of limited. Basically, too many annoying mailing list people and not enough tools to deal with them. I could block senders, one by one, somewhat tediously, but no good way to kill a thread. This was kind of a spiky pain, really bad some days, less intense other days.

Finally, there were some service disruptions or shortages or whatnot. Every time I clicked an email and did not get to see the email just stoked the fire a little more.

Things hit the bottom after I had already made the decision to quit. When it was just personal email in gmail, I was limping along, but once we started using gmail for work and I had to start using two browsers to keep things straight, the pot really boiled over. See also my other post on that.

In the end, I decided the only solution was to write my own mail client, because there are not enough of them. As far as I was concerned, gmail was the best available, and it’s just not that good. My replacement, since named mailtanium, was built to be fast and flexible. I’ll introduce it in another post.

Posted 29 Mar 2012 05:11 by tedu Updated: 09 Mar 2013 18:36
Tagged: mailtanium rants software