forked from mitmedialab/Junkyard-Jumbotron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jjmailrelay.sh
executable file
·23 lines (21 loc) · 1010 Bytes
/
jjmailrelay.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh
# Mail sent to *@jumbotron.media.mit runs this sctipt with the full
# email text including header info passed on stdin.
#
# Details are in /etc/aliases (from rahulb):
# The last line (be careful not to touch anything else), now says:
# jumbotron:\jumbotron,|/home/jumbotron/jumbotron-node/jjmailrelay.sh
# You can change that last part to whatever you want, or
# to stop echoing to them mail file remove the "\jumbotron," on that line
# NOTE: Make sure to run "sudo newaliases" after savingyour changes.
#
# Two other FYIs (from rahulb):
# - we can add more aliases into that /etc/aliases file if we want to
# reserve things like "[email protected]"
# - we shouldn't need to touch it, but the magic line that redirects
# *@jumbotron.media.mit.edu to the setup for [email protected]
# is in /etc/mail/virtusertable
# Simple POST the mail text to the web server
# -F means to use a form (POST)
# @- means to use stdin
exec curl -F mail=@- http://localhost/uploadMail