diff --git a/management/templates/aliases.html b/management/templates/aliases.html index dc916f95..d5a123ff 100644 --- a/management/templates/aliases.html +++ b/management/templates/aliases.html @@ -106,6 +106,40 @@ +
Use your box’s Mail alias API to add/remove aliases.
+ +Usage:
+ +curl -X VERB [-d "value"] --user {email}:{password} https://{{hostname}}/admin/mail/aliases[action]+ +
(Brackets denote an optional argument.)
+(Adding ?format=json
will give json encoded results)
Verb | Action | + |
---|---|---|
GET | Returns a list of existing mail aliases. | |
POST | /add | Adds a new mail alias. Required parameters are address and forward_to . |
POST | /remove | Removes a mail alias. Required parameter is address . |
Try these examples. For simplicity the examples omit the --user me@mydomain.com:yourpassword
command line argument which you must fill in with your email address and password.
# Gives a json encoded list of all mail users +curl -X GET https://{{hostname}}/admin/mail/users?format=json + +# adds a new email alias +curl -X POST -d "address=new_alias@mydomail.com" -d "forward_to=my_email@mydomain.com" https://{{hostname}}/admin/mail/aliases/add + +# removes a email alias +curl -X POST -d "address=new_alias@mydomail.com" https://{{hostname}}/admin/mail/aliases/remove ++