Swap to using base64

This commit is contained in:
x032205
2025-05-23 12:33:31 -04:00
parent 65bc522ae9
commit 12beb06682
2 changed files with 6 additions and 2 deletions

View File

@@ -309,7 +309,7 @@ export const formatSmtpConfig = () => {
};
if (envCfg.SMTP_CUSTOM_CA_CERT) {
tlsOptions.ca = envCfg.SMTP_CUSTOM_CA_CERT;
tlsOptions.ca = Buffer.from(envCfg.SMTP_CUSTOM_CA_CERT, "base64").toString("utf-8");
}
return {

View File

@@ -416,13 +416,17 @@ If your SMTP server uses a certificate signed by a custom Certificate Authority,
```
SMTP_PORT=465 # Or your SMTPS/STARTTLS port
SMTP_CUSTOM_CA_CERT='[CERTIFICATE PEM]'
SMTP_CUSTOM_CA_CERT='[BASE64 ENCODED CERTIFICATE PEM]'
# Always keep these as true for custom CA
SMTP_REQUIRE_TLS=true
SMTP_TLS_REJECT_UNAUTHORIZED=true
```
<Note>
The `SMTP_CUSTOM_CA_CERT` environment variable **must be encoded in base64 format**
</Note>
## Authentication
By default, users can only login via email/password based login method.