Update post-mail.sh
This commit is contained in:
parent
2201441c2f
commit
c555859896
|
@ -1,9 +1,10 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# Usage: cat email.txt | post-mail.sh https://example.org/conversations/recv/ /etc/ponyconf/key.txt
|
# Usage: cat email.txt | post-mail.sh REPLY_KEY@https://example.org/conversations/recv/
|
||||||
# The file /etc/ponyconf/key.txt should contain the value of the django setting REPLY_KEY.
|
# Get the value of REPLY_KEY from the django setting.
|
||||||
|
|
||||||
url="$1"
|
# Postfix users can set up an alias file with this content:
|
||||||
key="$2"
|
# 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=@-"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user