<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://labs.echoditto.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>EchoDitto Labs - Fun With Piped Emails - Comments</title>
 <link>http://labs.echoditto.com/node/75</link>
 <description>Comments for &quot;Fun With Piped Emails&quot;</description>
 <language>en</language>
<item>
 <title>Fun With Piped Emails</title>
 <link>http://labs.echoditto.com/node/75</link>
 <description>&lt;p&gt;One of the things that I&#039;ve learned over my years at EchoDitto &amp;mdash; that&#039;s been hammered home again and again &amp;mdash; is the importance of email.  Twitter&#039;s cool, social networking is great, but your online strategy absolutely has to account for email.  It&#039;s not glamorous, but it&#039;s important.&lt;/p&gt;
&lt;p&gt;The same is true on the tech side of things.  It&#039;s easy to forget: on a day-to-day basis, my wranglings with email generally include dealing with spam blacklists, ensuring that scripts don&#039;t function as open relays, and writing templating systems that&#039;ll be used to send mail.  All of it&#039;s pretty boring.  But it&#039;s worth keeping in mind that email, when piped to a script, can serve as the infrastructure for some pretty neat services, too.&lt;/p&gt;
&lt;p&gt;I did this two years ago for SXSW, building an SMS app on the cheap by counting on the mobile carriers&#039; SMS-to-email functionality.  It worked pretty well, although it was a rat&#039;s nest of Perl scripts.&lt;/p&gt;
&lt;p&gt;This week I took a pass at another application in Ruby (with a PHP frontend), and this time the resulting code is a bit less cringeworthy.  The idea is simple: set your Twitter &quot;new follower&quot; email notifications to go to a custom email address.  They&#039;ll be piped to a script, disassembled and the new follower&#039;s statistics analyzed.  If it looks like the new guy is a spammer or bot, they&#039;ll automatically be blocked.  If not, they won&#039;t be.  Either way you&#039;ll get an RSS notification about it.  You can try it out &lt;a href=&quot;http://twitter.manifestdensity.net&quot;&gt;here&lt;/a&gt;, if you&#039;d like.&lt;/p&gt;
&lt;p&gt;It&#039;s not exactly going to set the world on fire, particularly since Twitter is expected to release similar functionality soon.  But the project does serve as a pretty good template for how a piped email service can work.&lt;/p&gt;
&lt;p&gt;Of course, the missing ingredient in all of this is how to pipe your email to a script in the first place.  And when it comes to that, I can&#039;t be much help: it all depends on your mail server.  On my personal shared webhost, cPanel made it easy.  And on many systems it&#039;ll be as simple as creating a .forward file that contains a pipe and a path to an executable script.&lt;/p&gt;
&lt;p&gt;But you&#039;ll probably have to do some Googling.  Once you figure out how to get the pipe working, though, I hope you&#039;ll find this code useful.&lt;/p&gt;
</description>
 <comments>http://labs.echoditto.com/node/75#comments</comments>
 <category domain="http://labs.echoditto.com/taxonomy/term/178">email</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/179">pipe</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/2">ruby</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/29">twitter</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/100">unix</category>
 <enclosure url="http://labs.echoditto.com/files/twittersieve.tar.gz" length="37444" type="application/x-gzip" />
 <pubDate>Fri, 02 May 2008 11:37:27 -0700</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">75 at http://labs.echoditto.com</guid>
</item>
</channel>
</rss>
