Please tell me how to uninstall it from my Ubuntu VPS?
There is no uninstaller, so I think you'll find it quicker and easier to reinstall Ubuntu than trying to manually revert each change made by Mail-in-a-Box.
You can actually 'uninstall' it (remove would be a better word).
I happened to install it on a server that we were using already and it messed up some of the domains we had and so I had to get rid of it and install it on a new server. Reinstalling Ubuntu wasn't an option since the server already had many things. I did a little search and came across a way of removing it without refreshing the server.
mailinabox directory./etc/nginx/conf.d/local.conf to /etc/nginx/conf.d/local.conf.old/etc/nginx/conf.d/ssl.conf to/etc/nginx/conf.d/ssl.conf.oldsystemctl reload nginx.You can also rename the server by updating the /etc/hosts and /etc/hostname files
checkout this medium post