keep all
This commit is contained in:
34
scripts/CreateRoute.sh
Executable file
34
scripts/CreateRoute.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# https://documentation.mailgun.com/en/latest/api-routes.html
|
||||
MG_USER=
|
||||
MG_URL="https://api.mailgun.net/v3/routes"
|
||||
MG_APIKEY="api:key-6e4b01ba0681141a509c1c462fca40f4"
|
||||
MG_ORDER="GET /routes"
|
||||
|
||||
curl -s --user $MG_APIKEY -X POST \
|
||||
"$MG_URL" \
|
||||
-F priority=2 \
|
||||
-F description='Tout pour le domaine mg.nadineclement.eu' \
|
||||
-F expression='match_recipient(.*@mg.ndineclement.eu)' \
|
||||
-F action='forward("nadineclement@mail.fr")' \
|
||||
-F action='stop()'
|
||||
|
||||
exit 0
|
||||
curl -s --user $MG_APIKEY -G \
|
||||
$MG_URL \
|
||||
-d skip=1 \
|
||||
-d limit=1
|
||||
|
||||
# curl -s --user 'api:YOUR_API_KEY' -G \
|
||||
# https://api.mailgun.net/v3/routes \
|
||||
# -d skip=1 \
|
||||
# -d limit=1
|
||||
|
||||
|
||||
# curl -s --user $MG_APIKEY \
|
||||
# $MG_URL \
|
||||
# -F priority=0 \
|
||||
# -F description='Recuperation des routes' \
|
||||
# -F expression='match_recipient(".*@YOUR_DOMAIN_NAME")' \
|
||||
# -F action='forward("http://myhost.com/messages/")' \
|
||||
# -F action='stop()'
|
||||
29
scripts/deleteroute.sh
Executable file
29
scripts/deleteroute.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# https://documentation.mailgun.com/en/latest/api-routes.html
|
||||
MG_USER=
|
||||
MG_URL="https://api.mailgun.net/v3/routes"
|
||||
MG_APIKEY="api:key-6e4b01ba0681141a509c1c462fca40f4"
|
||||
MG_ORDER="GET /routes"
|
||||
|
||||
curl -s --user $MG_APIKEY -X DELETE \
|
||||
"$MG_URL/5baa298c8ecd870001d32820" \
|
||||
|
||||
exit 0
|
||||
curl -s --user $MG_APIKEY -G \
|
||||
$MG_URL \
|
||||
-d skip=1 \
|
||||
-d limit=1
|
||||
|
||||
# curl -s --user 'api:YOUR_API_KEY' -G \
|
||||
# https://api.mailgun.net/v3/routes \
|
||||
# -d skip=1 \
|
||||
# -d limit=1
|
||||
|
||||
|
||||
# curl -s --user $MG_APIKEY \
|
||||
# $MG_URL \
|
||||
# -F priority=0 \
|
||||
# -F description='Recuperation des routes' \
|
||||
# -F expression='match_recipient(".*@YOUR_DOMAIN_NAME")' \
|
||||
# -F action='forward("http://myhost.com/messages/")' \
|
||||
# -F action='stop()'
|
||||
@@ -7,8 +7,14 @@ MG_URL="https://api.mailgun.net/v3/routes"
|
||||
MG_APIKEY="api:key-6e4b01ba0681141a509c1c462fca40f4"
|
||||
MG_ORDER="GET /routes"
|
||||
|
||||
curl -s --user $MG_APIKEY -G \
|
||||
$MG_URL
|
||||
curl -s --user $MG_APIKEY -G $MG_URL
|
||||
exit 0
|
||||
|
||||
curl -s --user $MG_APIKEY -G $MG_URL| jq ".items"|jq ".[].id"
|
||||
exit 0
|
||||
|
||||
curl -s --user $MG_APIKEY -G $MG_URL| \
|
||||
python3 -c "import sys, json; print(json.load(sys.stdin)['id'])"
|
||||
|
||||
exit 0
|
||||
curl -s --user $MG_APIKEY -G \
|
||||
|
||||
Reference in New Issue
Block a user