forked from AFPy/PonyConf
fix bash version of sieve-filter
This commit is contained in:
parent
486c1ece58
commit
c5abcf078a
|
@ -22,7 +22,7 @@ def email_recv(request):
|
|||
or not hasattr(settings, 'REPLY_KEY'):
|
||||
return HttpResponse(status=501) # Not Implemented
|
||||
|
||||
key = request.POST.get('key')
|
||||
key = request.POST.get('key').strip()
|
||||
if key != settings.REPLY_KEY:
|
||||
raise PermissionDenied
|
||||
|
||||
|
|
9
conversations/post-mail.sh
Executable file
9
conversations/post-mail.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#! /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.
|
||||
|
||||
url="$1"
|
||||
key="$2"
|
||||
|
||||
curl ${url} -F 'key=<${key}' -F 'file=@-;filename="email"'
|
|
@ -1,5 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
url=${@#*\@}
|
||||
key=${@%\@*}
|
||||
curl ${url} -d key=${key} -d -
|
Loading…
Reference in New Issue
Block a user