Self-hosting Bitwarden: CLI-based integration with Mailcow for email aliases?

Hello Bitwarden community,

I’m considering setting up a self-hosted Bitwarden instance for my family. We currently use a Mailcow server for our emails, and I’m interested in creating an integration that would allow Bitwarden to automatically generate random catch-all email aliases in Mailcow when creating new login credentials.

After some research, I realized that Bitwarden’s CLI might offer a solution for monitoring new alias creation without needing API access (requires business subscription).

My questions are:

  1. Has anyone successfully used Bitwarden’s CLI to monitor for new login/alias creation in a self-hosted environment?
  2. If so, could you share your approach for integrating this with a separate email system like Mailcow?
  3. Are there any limitations or considerations I should be aware of when using the CLI for this purpose, compared to API access?
  4. Does using the CLI in this way comply with Bitwarden’s terms of service for self-hosted instances?

My goal is to enhance privacy by generating non-identifiable email aliases (e.g., “[email protected]” instead of “[email protected]”) directly from Bitwarden, then creating these in Mailcow using its API (/api/v1/add/alias endpoint).

I’m hoping to achieve this integration without needing business-level subscriptions for each family member.

Any insights, experiences, or code snippets from the community would be greatly appreciated.

Thank you for your help!

I have written a script to run from CLI using rbw that creates email aliases for Bitwarden created catchall aliases in Mailcow.

https://github.com/mr-biz/bitwarden-mailcow-bridge/blob/main/README.md

1 Like