entp / astrotrain

email => [http post, jabber]

This URL has Read+Write access

commit  c7621d6acb982a4a518d62ac051e060ec508f7c9
tree    7f3bb51c0d6cf490c6edd6a7c361fea359025b15
parent  fde2e2e7f5513c9d9ca5f4b5f2bfbdb7f544e4bc
astrotrain / README
3da1c08e » technoweenie 2008-10-16 add license and readme 1 astrotrain
2 ==========
3
4 Scans incoming emails for mapped recipients and sends an HTTP POST somewhere.
5
6 @user = User.new :login => 'bob'
7 @user.password = @user.password_confirmation = 'monkey'
8 @user.save
9
10 # set a mapping to accept email for support@example.com
1bed1ed0 » technoweenie 2008-10-19 rename Mapping#post_url => ... 11 @mapping = @user.mappings.build(:email_user => 'support', :email_domain => 'example.com', :destination => '...')
3da1c08e » technoweenie 2008-10-16 add license and readme 12 @mapping.save
13
14 # you can also create wildcards for users:
15 @user.mappings.build(:email_user => 'reply-*', :email_domain => 'example.com', ...)
16 @user.mappings.build(:email_user => '*', :email_domain => 'example.com', ...)
17
18 # need a script to read from STDIN to process emails.
19 /usr/bin/merb -m /var/www/astrotrain -r 'Message.receive(STDIN.read)' -e production
20
21 # set it up in postfix (master.cf, ymmv)
22 astrotrain unix - n n - - pipe
2d6386f4 » technoweenie 2008-10-16 forgot crucial flag to enab... 23 flags=O user=www-data argv=/var/www/astrotrain/merb.sh
3da1c08e » technoweenie 2008-10-16 add license and readme 24
25 This is still highly experimental. Don't even bother with the web UI yet,
26 there's no protection against anyone signing up and creating mappings on your server.
27
28 TODO
29 ====
30
31 Real web UI
32 Jabber support
33 DRb daemon
34 bounced emails