public
Description: email => [http post, jabber]
Homepage: http://oss.techno-weenie.net/discussions/astrotrain
Clone URL: git://github.com/entp/astrotrain.git
name age message
file .gitignore Wed Jan 21 11:17:32 -0800 2009 adding rfc2047 (mime 'encoded-words') support f... [towski]
file LICENSE Thu Oct 16 21:00:16 -0700 2008 add license and readme [technoweenie]
file README Sun Oct 19 15:38:27 -0700 2008 rename Mapping#post_url => Mapping#destination.... [technoweenie]
file Rakefile Thu Oct 16 00:54:51 -0700 2008 initial commit [technoweenie]
directory app/ Loading commit data...
directory autotest/ Fri Nov 21 16:18:42 -0800 2008 update merb support files [technoweenie]
directory config/ Fri Jul 24 14:43:03 -0700 2009 send To: header [technoweenie]
directory lib/ Wed Jul 15 20:19:20 -0700 2009 allow Astrotrain::Message classes to fetch more... [technoweenie]
directory merb/ Thu Oct 16 00:54:51 -0700 2008 initial commit [technoweenie]
directory public/ Fri Nov 21 16:18:42 -0800 2008 update merb support files [technoweenie]
directory schema/ Sun Oct 19 15:38:27 -0700 2008 rename Mapping#post_url => Mapping#destination.... [technoweenie]
directory spec/
directory tasks/ Fri Nov 21 16:18:42 -0800 2008 update merb support files [technoweenie]
directory vendor/ Tue Jan 06 15:55:18 -0800 2009 update rest-client [technoweenie]
README
astrotrain
==========

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

  @user = User.new :login => 'bob'
  @user.password = @user.password_confirmation = 'monkey'
  @user.save

  # set a mapping to accept email for support@example.com
  @mapping = @user.mappings.build(:email_user => 'support', :email_domain => 'example.com', :destination => '...')
  @mapping.save
  
  # you can also create wildcards for users:
  @user.mappings.build(:email_user => 'reply-*', :email_domain => 'example.com', ...)
  @user.mappings.build(:email_user => '*', :email_domain => 'example.com', ...)

  # need a script to read from STDIN to process emails.
  /usr/bin/merb -m /var/www/astrotrain -r 'Message.receive(STDIN.read)' -e production

  # set it up in postfix (master.cf, ymmv)
  astrotrain unix  -       n       n       -       -       pipe
  flags=O user=www-data argv=/var/www/astrotrain/merb.sh

This is still highly experimental.  Don't even bother with the web UI yet,
there's no protection against anyone signing up and creating mappings on your server.

TODO
====

Real web UI
Jabber support
DRb daemon
bounced emails