Skip to content

Latest commit

 

History

History
89 lines (53 loc) · 2.04 KB

README.md

File metadata and controls

89 lines (53 loc) · 2.04 KB

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