Apps using requiresValidCertificate in the sendmail addon cannot send emails on a domain configured to use an external SMTP relay
-
I ran into an issue while packaging a Django app that performs strict certificate validation on the hostname when sending emails, installed on a Cloudron instance that uses an external SMTP relay (another Cloudron) for outgoing mail.
When
requiresValidCertificateis set totruein the app manifest, Cloudron replaces the value ofCLOUDRON_MAIL_SMTP_SERVERwith the FQDN of the mail server, as described in the docs. The problem is that when the domain's mailing settings are configured to relay through an external SMTP server, Cloudron doesn't seem expose any mailing ports, so the app ends up trying to connect to a host that simply doesn't accept SMTP connections.Steps to reproduce:
- Configure a domain on Cloudron to relay outgoing mail through an external SMTP server
- Install ntfy using that domain
- Log in to the admin account and add an email address to it
- The verification email will never be sent
ntfy doesn't appear to log an error in this case, the connection attempt to the SMTP server most likely just times out silently in the background.
-
Hello @milian.hackradt
That is a tricky one.
Since when usingrequiresValidCertificate: truetheCLOUDRON_MAIL_SMTP_SERVERvariable points to the domain itself e.g.:mail.cloudron.dev.
But whenmail.cloudron.devis not hosting the mail server but is using a relay, there is no smtp/imap port to connect to.
So when using the other variables from https://docs.cloudron.io/packaging/addons#sendmail for automatic configuration, the app itself tries to auth against something that is not there.Interesting edge case you found there!
-
G girish has marked this topic as solved
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login