I host my own email (and that associated with all the domains I manage), and therefore have to deal with the issue of spam. My spam filter currently catches between 500 and 600 messages a day, and misses around 50 spam messages.

While it is pretty accurate, I do feel I need to personally review the spam mailbox before deleting messages, as somewhere around 1 in 5000 messages tagged as spam are legitimate.  I've taken different approaches to this review, but currently sort all messages by subject and then can quickly page through messages with identical or similar subject lines.  For example, currently in the hopper:
  • Two pages of "Angelina Jolie"
  • Four pages of "Britney Spears"
  • Twelve pages of debt ("consolidation, "loans", etc.)
  • Three pages of replica watches and handbags
  • Seven pages of "Solution for your sexual life"


I have been using SpamAssassin for a number of years and have been quite happy with it.  It would presumably be even more effective if I had a more current version of the filters.

But I am getting very tempted to move to a challenge response system, as annoying as they are.  I'm just spending too much of my precious time combing through the spam box.
 
 
One of the downsides to Rails' automatic method generation is that sometimes it bites you in the butt.

I've been tearing my hair out trying to figure out why ActionView::Helpers::AssetTagHelper.image_path was behaving strangely all of a sudden.  It didn't help that I had a boatload of local changes and there were multiple layers causing problems.  I am using the Rails Engines plugin, which was alias_method_chaining that method, and I thought the problem was in the aliasing.  But the other AssetTagHelper methods (stylesheet_link_tag, javascript_include_tag, and image_tag) were all correctly aliased and working fine.

It turns out that when I created a RESTful route for my new Image ActiveRecord class that it automatically created an image_path method, overriding the normal one.

I'm going to go look for some glue to see if I can get this hair to stick back on my head.
 
 
I am yet again looking into the best way to get transparent PNGs to display correctly in a Rails app.  This is, of course, a well-known problem, but I've run into problems with the common solutions.

The complexities is that
  • Rails' approach of appending cache-busting timestamps on the end of image URLs sometimes confuses solutions looking for image references ending in ".png."
  • I want this to work on sites that potentially use a large number of small icons.
  • I want this to work on images that are not initially displayed.  I have a sitemap that is a dynamic directory tree, with nodes that can be clicked on to display the child nodes.
  • I'd also like to use it on CSS background images.


Bobosola Solution

This solution (with no apparent attribution) uses Javascript and the AlphaImageLoader filter.

It requires a fix, helpfully provided here, to match image URLs with a regular expression, rather than just a straight suffix.

For some reason it only seemed to work with some of the images on my page, and I couldn't figure out what was causing the problems.  This approach also doesn't address CSS background images.

TwinHelix Solution

This solution by Angus Turnbull utilizes custom Microsoft CSS "behaviors."  It works out of the box with Rails image URLs, which was nice.

The first problem I ran into is that it is relatively slow, as it iterates through each image in the document.  It was taking five seconds to step through each of the GIF images that made up the tree structure.  I addressed this by targeting the behavior to only images with a particular CSS class.

While I was having the initial slowness problem, I noticed that images that were initially hidden (CSS "display: none;") were not showing up when their display was enabled.  But this problem went away when I targeted by CSS class.  Hmm.

This approach supports CSS background images.

So I'm going with this solution for now.