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
  • 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

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. EspoCRM
  3. Outbound email settings being overwritten when app is restarted

Outbound email settings being overwritten when app is restarted

Scheduled Pinned Locked Moved EspoCRM
25 Posts 5 Posters 2.7k Views 5 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.
    • C Offline
      C Offline
      ccfu
      wrote on last edited by
      #1

      I have noticed that every time the app is restarted the outbound SMTP settings are overwritten, which causes email to stop working because we are using a custom SMTP server. In any case, port 2525 is being stored as 2,525 which means that even the default settings cannot work.

      1 Reply Last reply
      1
      • jdaviescoatesJ Offline
        jdaviescoatesJ Offline
        jdaviescoates
        wrote on last edited by
        #2

        Select this option here in the App Email settings and I think you'll be OK:

        image.png

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ccfu
          wrote on last edited by
          #3

          Thanks, but I don't see that option. Was it added in 7.6? Then I would need to update the installation.

          girishG 1 Reply Last reply
          1
          • C Offline
            C Offline
            ccfu
            wrote on last edited by
            #4

            Looks like this setting is not available for EspoCRM.

            @girish Is there any reason why this setting cannot be activated?

            jdaviescoatesJ 1 Reply Last reply
            1
            • C ccfu

              Looks like this setting is not available for EspoCRM.

              @girish Is there any reason why this setting cannot be activated?

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote on last edited by
              #5

              @ccfu said in Outbound email settings being overwritten when app is restarted:

              Looks like this setting is not available for EspoCRM.

              ah

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply
              0
              • C ccfu

                Thanks, but I don't see that option. Was it added in 7.6? Then I would need to update the installation.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @ccfu we add that option depending on if it makes sense for the app. Maybe it makes sense to add this for Espo. Is the use case here to configure Espo to use some outbound mailer? Can you tell a bit more of the use case? It's quite trivial to add the flag itself.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  ccfu
                  wrote on last edited by
                  #7

                  @girish Thanks for replying. Yes, the use case is to configure a different outbound mailer in Espo. Espo differentiates between outbound settings for system emails (configured by Cloudron) and outbound settings for individual mail accounts. You can actually deactivate the SMTP settings for system emails to use the settings from another mail account but this configuration is then also overwritten.

                  If it is indeed trivial to do, I would very much appreciate the option being added here.

                  girishG 1 Reply Last reply
                  1
                  • C ccfu

                    @girish Thanks for replying. Yes, the use case is to configure a different outbound mailer in Espo. Espo differentiates between outbound settings for system emails (configured by Cloudron) and outbound settings for individual mail accounts. You can actually deactivate the SMTP settings for system emails to use the settings from another mail account but this configuration is then also overwritten.

                    If it is indeed trivial to do, I would very much appreciate the option being added here.

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #8

                    @ccfu said in Outbound email settings being overwritten when app is restarted:

                    Espo differentiates between outbound settings for system emails (configured by Cloudron) and outbound settings for individual mail accounts.

                    So, your use case is to select an existing email account (in EspoCRM) as the system mail configuration ? Trying to understand why the system mail cannot use Cloudron mail itself.

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      ccfu
                      wrote on last edited by
                      #9

                      @girish It can in theory use Cloudron for system mail but there is a bug in Espo which converts 4-digit port numbers to amounts with a thousand separator: 2525 -> 2,525 so the settings are invalid. Independently from that, however, we want to be able to use an external mailserver configuration here and not have it overwritten.

                      1 Reply Last reply
                      1
                      • C Offline
                        C Offline
                        ccfu
                        wrote on last edited by
                        #10

                        @girish Just following up on this, I wonder whether it wouldn't in fact make sense (not just for Espo) to only writing the email settings on initial install. I may be missing something of course, but I don't see any obvious reason to write the setting on app restarts since if they have been changed in the app there was probably a reason for doing so, and if they haven't been changed they don't need updating. Alternatively, would it not be worth considering setting the flag to "app manages email" for all apps as a rule (unless there is a good reason not to) rather than only for some apps (unless there is a good reason to do so)?

                        1 Reply Last reply
                        0
                        • nebulonN Offline
                          nebulonN Offline
                          nebulon
                          Staff
                          wrote on last edited by
                          #11

                          The Cloudron packages are written in a way so they always try to ensure the expected state on every restart. This helps if apps crash mid-way or the user accidentally misconfigured something. Also the platform may change the addon (database/mail/..) details without the app knowing. So it would restart the app and the new settings will be applied.

                          For cases where the admin explicitly wants to maintain those settings on their own, we have this optional flag where it makes sense. So far this wasn't asked for espo yet.

                          1 Reply Last reply
                          1
                          • C Offline
                            C Offline
                            ccfu
                            wrote on last edited by
                            #12

                            @nebulon Thanks for the explanation. Then I can see why it is good to write the configuration on a restart but I would then like to request the flag to maintain settings in the app also be added to Espo.

                            1 Reply Last reply
                            1
                            • nebulonN Offline
                              nebulonN Offline
                              nebulon
                              Staff
                              wrote on last edited by
                              #13

                              Yes, I have added to my list.

                              1 Reply Last reply
                              1
                              • C Offline
                                C Offline
                                ccfu
                                wrote on last edited by
                                #14

                                @nebulon Thank you!

                                1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  ccfu
                                  wrote on last edited by
                                  #15

                                  @nebulon Any ETA on this? The latest app update once again overwrote the mail settings and because the port is still being saved as 2,525, the default settings don't work either.

                                  girishG 1 Reply Last reply
                                  0
                                  • C ccfu

                                    @nebulon Any ETA on this? The latest app update once again overwrote the mail settings and because the port is still being saved as 2,525, the default settings don't work either.

                                    girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #16

                                    @ccfu I guess we have two options . We report issue upstream and can also submit a fix upstream to fix the port separator issue. Alternately, we have to make email configuration optional in the Cloudron package. We prefer the former since the larger project will benefit . What do you think?

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      ccfu
                                      wrote on last edited by
                                      #17

                                      @girish I would also be happy with the former. I suspect most people have 2- or 3-digit port numbers so this has not been an issue for the developers up to now.

                                      1 Reply Last reply
                                      0
                                      • imc67I Offline
                                        imc67I Offline
                                        imc67
                                        translator
                                        wrote on last edited by
                                        #18

                                        Strange that you experienced issues with the port number, ours (2 EspoCRM instances) never had any issue and the port number is automatically set at 2.525

                                        1 Reply Last reply
                                        1
                                        • C Offline
                                          C Offline
                                          ccfu
                                          wrote on last edited by
                                          #19

                                          @imc67 Interesting it works for you. Maybe I need to revisit this this. Perhaps it makes a difference that in your case it is 2.525 and in ours 2,525 because of our settings, but either would be invalid port numbers.

                                          imc67I girishG 2 Replies Last reply
                                          0
                                          • C ccfu

                                            @imc67 Interesting it works for you. Maybe I need to revisit this this. Perhaps it makes a difference that in your case it is 2.525 and in ours 2,525 because of our settings, but either would be invalid port numbers.

                                            imc67I Offline
                                            imc67I Offline
                                            imc67
                                            translator
                                            wrote on last edited by
                                            #20

                                            @ccfu in the config.php it shows as:

                                            'smtpPort' => '2525',
                                            

                                            so I guess it's just a GUI "thing"?

                                            1 Reply Last reply
                                            2
                                            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