malias was created out of laziness. I have the habbit of creating aliases for different sites and services I register/use on the big internet. It makes it easy to just delete the alias when it has served its purpose. That way I make a small dent in the amount of spam I get.

The script is intended for those that use the Mailcow email server package.

What can it do;

  • Create and delete an alias
  • Create a time-limited alias
  • List all aliases
  • List all domains on the Mailcow instance
  • Show active information about script and Mailcow instance

What can it not do;

  • It can not add domains
  • it can not alter or delete domains
  • It can not alter anything other than what is listed above.

Usage

Install

To use the application you need to have a running Mailcow instance and you need to create a Mailcow API key. All references to the installed script will be malias. To get started follow these steps:

  • Download the script from the repo Malias
  • Extract and copy/move the script to a location in your $PATH. You can rename the script if you wish!
  • Make it executable with chmod +x malias
  • Run pip3 install -r requirements.txt

Next

In order to use this API you have to create a API key and add your IP address to the whitelist of allowed IPs1 this can be done by logging into the Mailcow UI using your admin account, then go to Configuration > Access > Edit administrator details > API. There you will find a collapsed API menu.

Add the API key with

  • malias -k <YOUR API KEY>

then add the mailcow instance e.g mail.yourdomain.tld with

  • malias -m mail.yourdomain.tld.

When that is done, I would recomend to populate your local db with the aliases already on your Mailcow instance with

  • malias -c

To get an overview of commands run malias -h.


That is it. If you find any errors or if you want to request a feature or improvement please head over to the issue section on the git page!

Happy Mailcowing :-)

1: You might not need that. Please try without first, and add it as described if it is not working!

--
Rune