2016-07-07 23:07:55 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2016-07-08 16:03:46 +00:00
|
|
|
# Usage: cat email.txt | post-mail.sh REPLY_KEY@https://example.org/conversations/recv/
|
|
|
|
# Get the value of REPLY_KEY from the django setting.
|
2016-07-07 23:07:55 +00:00
|
|
|
|
2016-07-08 16:03:46 +00:00
|
|
|
# Postfix users can set up an alias file with this content:
|
2016-07-11 19:33:34 +00:00
|
|
|
# reply: "|/path/to/post-mail.sh mykey@https://example.org/conversations/recv/
|
|
|
|
# don't forget to run postalias and to add the alias file to main.cf under alias_map.
|
2016-07-07 23:07:55 +00:00
|
|
|
|
2016-09-28 22:01:33 +00:00
|
|
|
curl ${@#*\@} -F key=${@%\@*} -F "email=@-;filename=email.txt"
|