From c5558598960a8d1e6337d836b9d323ee3555091d Mon Sep 17 00:00:00 2001 From: Aymeric / APLU Date: Fri, 8 Jul 2016 18:03:46 +0200 Subject: [PATCH] Update post-mail.sh --- conversations/post-mail.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/conversations/post-mail.sh b/conversations/post-mail.sh index fc54ab9..03f0725 100755 --- a/conversations/post-mail.sh +++ b/conversations/post-mail.sh @@ -1,9 +1,10 @@ #! /bin/bash -# Usage: cat email.txt | post-mail.sh https://example.org/conversations/recv/ /etc/ponyconf/key.txt -# The file /etc/ponyconf/key.txt should contain the value of the django setting REPLY_KEY. +# Usage: cat email.txt | post-mail.sh REPLY_KEY@https://example.org/conversations/recv/ +# Get the value of REPLY_KEY from the django setting. -url="$1" -key="$2" +# Postfix users can set up an alias file with this content: +# 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. -curl "${url}" -F "key=<${key}" -F 'email=@-' +curl ${@#*\@} -F key=${@%\@*} -F "email=@-"