github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

entp / astrotrain

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 218
    • 9
  • Source
  • Commits
  • Network (9)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (3)
    • master ✓
    • merb
    • nomerb
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

email => [http post, jabber] — Read more

  cancel

http://oss.techno-weenie.net/discussions/astrotrain

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

update gemspec to 0.5 
technoweenie (author)
Sat Jan 16 04:44:08 -0800 2010
commit  4af09fbbbfefbb93b4d743afa11d8d4eb58c1221
tree    ddc3f2ae91035295113579e18d4ab47a44a61a4b
parent  31303636686a641a9eb4a5670bb4e77d09b932a1
astrotrain /
name age
history
message
file .gitignore Thu Sep 17 20:03:56 -0700 2009 add astrotrain gem [technoweenie]
file LICENSE Thu Oct 16 21:00:16 -0700 2008 add license and readme [technoweenie]
file README Thu Sep 17 20:05:38 -0700 2009 clarify location of astrotrain [technoweenie]
file Rakefile Fri Sep 25 14:12:32 -0700 2009 bump gem version [technoweenie]
file VERSION Sat Jan 16 04:42:19 -0800 2010 Version bump to 0.5.0 [technoweenie]
file astrotrain.gemspec Sat Jan 16 04:44:08 -0800 2010 update gemspec to 0.5 [technoweenie]
directory config/ Wed Sep 02 23:32:18 -0700 2009 add api for checking the contents of the queue [technoweenie]
directory lib/ Sat Jan 16 04:40:50 -0800 2010 when parsing recipient headers, make the to/del... [technoweenie]
directory test/ Sat Jan 16 04:40:50 -0800 2010 when parsing recipient headers, make the to/del... [technoweenie]
README
astrotrain
==========

NOTE: Astrotrain is a full gem now.  If you're looking for the old Astrotrain on merb:
http://github.com/entp/astrotrain/tree/merb
git://github.com/entp/astrotrain.git (merb branch)

Scans incoming emails for mapped recipients and sends an HTTP POST somewhere.

  # setup a config file.
  # Point the queue_path at a directory that your mail server dumps each raw incoming mail.
  require 'astrotrain'

  Astrotrain.load path do
    DataMapper.setup(:default, {
      :adapter  => "mysql",
      :database => "astrotrain",
      :username => "root",
      :host     => "localhost"
    })
  end
  Astrotrain::Message.queue_path = "/path/to/maildir"
  Astrotrain::Mapping::Transport.processing = true

  # start up IRB
  irb -I /var/astrotrain/lib -r config.rb

  # manage mappings
  LIB=/var/astrotrain/lib CONFIG=config.rb rake at:mappings
  LIB=/var/astrotrain/lib CONFIG=config.rb rake at:map EMAIL=support@foo.com DEST=http://foo.com/email
  LIB=/var/astrotrain/lib CONFIG=config.rb rake at:unmap MAP=123

  # start the server that runs over the queue directory
  LIB=/var/astrotrain/lib CONFIG=config.rb rake at:process

  # start the sinatra API
  ruby -I /var/astrotrain/lib /var/astrotrain/lib/astrotrain/api.rb config.rb

A single Astrotrain process currently handles email for two production applications, processing thousands daily.
It's far from perfect, but definitely usable.

TODO
====

Gem package - I realize the load paths could be simplified a bunch, so a gem package will come soon.
Docs
bounced emails
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server