Sha256: 014c61f19c2c40a14c18546421dc2e494b46847d6cda8b562b0379e842ba91f2

Contents?: true

Size: 1.51 KB

Versions: 16

Compression:

Stored size: 1.51 KB

Contents

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

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
entp-astrotrain-0.2.0 README
entp-astrotrain-0.2.1 README
entp-astrotrain-0.3.0 README
entp-astrotrain-0.3.1 README
entp-astrotrain-0.4.0 README
entp-astrotrain-0.4.1 README
entp-astrotrain-0.4.2 README
entp-astrotrain-0.4.3 README
astrotrain-0.5.0 README
astrotrain-0.4.5 README
astrotrain-0.4.4 README
astrotrain-0.4.3 README
astrotrain-0.4.2 README
astrotrain-0.4.1 README
astrotrain-0.4.0 README
astrotrain-0.3.1 README