👨💻 about me home CV/Resume News 🖊️ Contact Codeberg Github LinkedIn 🏆 Best of LuaX (tools) pub bang ypp panda lsvg ldc yreq Fizzbuzz Calculadoira TPG picfg Belenos (intro) 🔀 Git Repos
Made in Europe
This repository contains some useful tools to manage OVH services:
By using this software, you acknowledge that it is your responsibility to fully understand how it works, how it is configured, and how it is used in your environment.
You assume full responsibility for any actions performed with this software, including but not limited to configuration changes, data handling, deployment decisions, and operational use.
The author, contributors, and distributors of this software shall not be held responsible or liable for any misuse, damage, data loss, security issues, legal consequences, or other consequences arising from the use or misuse of this software.
Use this software at your own risk.
You need to install LuaX and bang first:
export PREFIX=~/.local # <-- your installation prefix directory here
export CDSOFT=https://codeberg.org/cdsoft
git clone $CDSOFT/luax && ( cd luax && ./bootstrap.sh && ninja install )
eval $($PREFIX/bin/luax env) # <-- also add this to .bashrc/.zshrc/...
git clone $CDSOFT/bang && ( cd bang && ./boot.lua && ninja install )Then get OVH tools and install it:
git clone --recurse-submodules $CDSOFT/ovh && ( cd ovh && bang && ninja install )The configuration is in ~/.config/ovh.toml. E.g.:
# Mail redirections
default = {
domain = { from = "domain1.tld", to = "domain2.tld" },
name = "default_name",
}
domains = [
"domains.tld",
]
external_emails = [
"name1@external_domain1.tld",
"name2@external_domain2.tld",
]
api = {
# See https://api.ovh.com/createToken/
# Rights: GET, POST, DELETE
endpoint = "https://eu.api.ovh.com/1.0",
application_key = "...",
application_secret = "...",
consumer_key = "...",
}
# DynHOST
[[dynhost]]
host = "host.domain.tld"
user = "doman.tld-user"
password = "..."omr manages mail redirections on OVH mailboxes and
domain names.
$ omr
OVH Mail Redirections
omr ls [pattern]
omr add new_alias [to existing_email]
omr rm existing_alias [to existing_email]
omr import file
Let's say you own two domains (domain1.tld and
domain2.tld), you have a private email
(me@domain1.tld) and you need redirections from both
domains to your private email. You also want some redirection to an
external email (me@external_domain.tld).
The configuration file can look like:
default = {
domain = { from = "domain1.tld", to = "domain1.tld" },
name = "default_name",
}
domains = [
"domain1.tld",
"domain2.tld",
]
external_emails = [
"me@external_domain.tld",
]
api = {
# See https://api.ovh.com/createToken/
# Rights: GET, POST, DELETE
endpoint = "https://eu.api.ovh.com/1.0",
application_key = "<your application key>",
application_secret = "<your application secret>",
consumer_key = "<your consumer key>",
}omr ls: list all redirectionsomr ls @domain2: list all redirections to
domain2.tldomr ls foo: list all redirections containing
foo in the user namefrom foo@domain1.tld to
me@domain1.tld:
omr add foo@domain1.tld to me@domain1.tld (explicit
domains and names)omr add foo@domain1.tld to me (domain1.tld
is the default destination domain)omr add foo@domain1.tld (me@domain1.tld is
the default destination address)omr add foo (domain1.tld is also the
default source domain)from foo@domain2.tld to
me@domain1.tld:
omr add foo@domain2.tld to me@domain1.tld (explicit
domains and names)omr add foo@domain2.tld to me (domain1.tld
is the default destination domain)omr add foo@domain2.tld (me@domain1.tld is
the default destination address)from foo@domain2.tld to
me@domain2.tld:
omr add foo@domain2.tld to me@domain2.tld (explicit
domains and names)from foo@domain1.tld to me@domain1.tld
only:
omr rm foo@domain1.tld to me@domain1.tld (explicit
domains and names)omr rm foo to me@domain1.tld (domain1.tld
is the default destination domain)from foo@domain1.tld to all emails:
omr rm foo@domain1.tld (explicit domains and
names)omr rm foo (domain1.tld is the default
destination domain)omr ls > redirectionsomr import redirectionsdynhost associates the current public IP to OVH dynamic
hosts.
If the dynhost array is found in
~/.config/ovh.toml, each entry is modified to associate the
public IP to an OVH subdomain.
dynhost can be run periodically to detect IP changes and
update the OVH dynamic hosts accordingly.
CDSoft OVH Tools is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CDSoft OVH Tools is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with CDSoft OVH Tools. If not, see <https://www.gnu.org/licenses/>.
For further information about CDSoft OVH Tools you can visit
https://codeberg.org/cdsoft/ovh
This site is powered by LuaX, bang, ypp, cdsoft.css and Pandoc.
Mirrors: cdelord.fr – christophe.delord.free.fr – cdsoft.codeberg.page