Little script provide a basic REST API to create users in the Mailu Mail Server.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mael G. 885b4c87be Shlex securisation 4 years ago Config sample 🤖 4 years ago
app.ini Init 4 years ago Shlex securisation 4 years ago
config.sample.json Config sample 🤖 4 years ago
mailuremote.service Init 4 years ago
requirements.txt Init 4 years ago Init 4 years ago

Mailu Remote

This little script provide a basic REST API to create users in the Mailu Mail Server. He use directly the docker command because they are no other way to do this, sorry. _(so the app need to run as root :c )

Installation :

  • Mailu Remote need Python3.6+ and some Python requirements. Install them using this command : pip3 install -r requirements.txt
  • Now put the content of this git repository into your Mailu main directory (in my case /mailu/).
  • Rename config.sample.json in config.json
  • Generate a token with python3 gentoken and copy it in your clipboard.
  • Put the token in config.json.
  • If needed, change the port in app.ini at the line http:.
  • If you use UFW or an other firewall, open the selected port (by default 8000)
  • Move mailuremote.service in /lib/system/systemd/.
  • Start the service : systemctl start mailuremote.
  • Enable it (to start it on boot) : systemctl enable mailuremote.
  • Check if all work using curl

Now you can create a register form using this API !

Results :

The only working endpoint is /user usign POST METHOD. To use this endpoint you need to send the TOKEN send in config.json usign the header X-Api-Key. After that you need to post in form-data an user and password key (String).

  • API Code 1 : The user is succefully added.

  • API Code 9 : The user can't be added.

  • API Code 10 : The email key is not a correct String.

  • API Code 8 : A key is missing in the POST request.


This project is under Public Domain.