bitwarden / self-host

Bitwarden's self-hosted release repository
GNU General Public License v3.0
307 stars 54 forks source link

Add checksmtp functionality for SMTP configuration verification #231

Open fer opened 3 months ago

fer commented 3 months ago

Description

Introduces the checksmtp command to the Bitwarden self-hosted management script, enabling administrators to easily verify the SMTP configuration directly from the command line. This functionality aims to streamline the troubleshooting process of email delivery issues by providing a quick and straightforward method to test the SMTP server connection, authentication, and secure communication.

Features

Usage examples

To use this functionality, run the following command from the Bitwarden self-hosted script directory:

./bitwarden.sh checksmtp

When SMTP configuration is wrong:

SMTP authentication failed or connection error occurred.

When SMTP configuration is right:

SMTP settings are correct.

Testing

Please review this PR for inclusion in the next release of Bitwarden self-hosted. Your feedback and suggestions are welcome!

bitwarden-bot commented 3 months ago

Logo Checkmarx One – Scan Summary & Detailsf31e5509-23c9-410d-ad41-55190e17ddd5

No New Or Fixed Issues Found

fer commented 3 months ago

@vgrassia, thank you very much for your comments!

I've implemented the following enhancements:

Currently, this script is designed to verify connectivity without sending any messages. However, I'm open to incorporating a feature to send a test message if we determine it's beneficial for our testing process.

Please let me know if you'd like me to proceed with that addition as your valuable suggestions.