Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Apps using requiresValidCertificate in the sendmail addon cannot send emails on a domain configured to use an external SMTP relay

Apps using requiresValidCertificate in the sendmail addon cannot send emails on a domain configured to use an external SMTP relay

Scheduled Pinned Locked Moved Solved Support
relaymail relaysmtp
4 Posts 3 Posters 81 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • milian.hackradtM Offline
    milian.hackradtM Offline
    milian.hackradt
    wrote last edited by milian.hackradt
    #1

    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 requiresValidCertificate is set to true in the app manifest, Cloudron replaces the value of CLOUDRON_MAIL_SMTP_SERVER with 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:

    1. Configure a domain on Cloudron to relay outgoing mail through an external SMTP server
    2. Install ntfy using that domain
    3. Log in to the admin account and add an email address to it
    4. 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.

    1 Reply Last reply
    1
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by
      #2

      Hello @milian.hackradt
      That is a tricky one.
      Since when using requiresValidCertificate: true the CLOUDRON_MAIL_SMTP_SERVER variable points to the domain itself e.g.: mail.cloudron.dev.
      But when mail.cloudron.dev is 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!

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote last edited by
        #3

        mm, something else must be off. The code path for sending email with or without relay is the same from app's point of view.

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote last edited by
          #4

          Thanks for the report. I have fixed this with 1cd0140808ccaadc665e9f06b3910a8abbbdc167

          1 Reply Last reply
          0
          • girishG 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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search