mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-06 12:55:03 -05:00
[GH-ISSUE #934] Logging and docs issues around SMTP TLS configuration #8463
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jcrawfordor on GitHub (Jun 18, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/934
Originally assigned to: @miloschwartz on GitHub.
I encountered the same problem as the closed issue #652 . That issue was closed when the reporter seems to have avoided the problem, but it still exists. Any action that leads to an email being sent, like inviting a user or an invited user trying to get a verification code, can result in an exception:
This appears to be an error encountered when trying to log a more useful message, which is the first thing that could be fixed. In practice, this behavior seems to indicate a problem with verifying the TLS certificate of the mail server (in my situation, it's sending a cert with the wrong domain name due to a split-horizon DNS situation which should be addressed but it is what it is).
Validating the cause/fix was additionally complicated by what I believe to be an error in the documentation at https://docs.fossorial.io/Pangolin/Configuration/config
It states that "smtp_tls_reject_unauthorized" means "Do not fail if the server certificate cannot be verified." However, it's actually the opposite - "true" means it will fail if the server cannot be verified, "false" will allow a connection even with an invalid certificate. Perhaps for the same reason, it also gives the wrong default - it says that the default is "false", but testing shows that the default is "true".
If you encounter the above exception, try setting smtp_tls_reject_unauthorized to false. If that fixes the error, check out the TLS certificate presented by your mail server.
@miloschwartz commented on GitHub (Jun 19, 2025):
Thanks- just checked and looks like the default is true in nodemailer. I'll update the docs!