Skip to content

Manage your email alias using the OVH API with Python

License

Notifications You must be signed in to change notification settings

Indigo744/ovh-manage-email-alias-python

Repository files navigation

ovh-manage-email-redirection-python

Manage your email aliases using the OVH API with Python.

Prerequesite

Here what you'll need:

Configuration

OVH conf

Rename ovh.default.conf to ovh.conf and get your keys from https://eu.api.ovh.com/createToken/.

Note that this is for EU only. See others endpoints here.

Module conf

Rename config.default.py to config.py and set your domain and your private email.

Running the scripts

Add an alias

The following command line will add an alias [email protected] (e.g. for creating an alias for Github)

python ovh_mail_alias_add.py https://github.com/Indigo744/ovh-manage-email-alias-python

Create email alias:
From : [email protected]
To   : [email protected]

Continue (ENTER or CTRL+C to cancel)?

Alias created (ID=123456789)

Calling the script without any parameter will ask for your input.

Remove an alias

The following command line will remove the alias we created just before

python ovh_mail_alias_rm.py 123456789

Delete the following alias:
ID    : 123456789
From  : [email protected]
To    : [email protected]

Continue (ENTER or CTRL+C to cancel)?

Deleting...
Alias deleted!

List all aliases

The following command line will list all the aliases.

python ovh_mail_alias_ls.py

It procudes a TSV file (Tab-Separated File).

You can redirect the output to a file in order to open it in Excel or Calc.

python ovh_mail_alias_ls.py > list.tsv

About

Manage your email alias using the OVH API with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages