Aliases are email forwarders. An alias can forward email to a mail user or to any email address.
To use an alias or any address besides your own login username in outbound mail, the sending user must be included as a permitted sender for the alias.
Alias |
Forwards To | Permitted Senders |
---|
hostmaster@, postmaster@, admin@ and abuse@ email addresses are required on some domains.
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