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. issue with mailing list delivery when using external SMTP server

issue with mailing list delivery when using external SMTP server

Scheduled Pinned Locked Moved Solved Support
mailmail relaysmtpmailing-lists
32 Posts 5 Posters 4.2k 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.
  • girishG girish

    @avatar1024 external relay services will only relay addresses that you added to them explicitly. So if you added foo.com into postmark, postmark will only relay email address which have From as *@foo.com .

    The idea of mail forwarding is that the From address has to be that of the original. So, the From address has to set to say someone@posteo.com . Postmark will reject these emails (correctly).

    So to summarize: domain-locked relays and keeping the original sender on forwards/lists do not go together. You can relay or you can transparently forward third-party mail, not both. There's nothing Cloudron can do about this from what I know.

    avatar1024A
    avatar1024A
    avatar1024
    wrote on last edited by avatar1024
    #13

    @girish said:

    @avatar1024 external relay services will only relay addresses that you added to them explicitly. So if you added foo.com into postmark, postmark will only relay email address which have From as *@foo.com .

    The idea of mail forwarding is that the From address has to be that of the original. So, the From address has to set to say someone@posteo.com . Postmark will reject these emails (correctly).

    So to summarize: domain-locked relays and keeping the original sender on forwards/lists do not go together. You can relay or you can transparently forward third-party mail, not both. There's nothing Cloudron can do about this from what I know.

    Thanks for the explainer @girish. Does that means one cannot use an external relay to replace the built in SMTP server if we use mailing lists (or the mailbox + forward implementation in Cloudron 10) - given most likely senders and mailing lists members with use random email providers?

    girishG 1 Reply Last reply
    0
    • avatar1024A avatar1024

      @girish said:

      @avatar1024 external relay services will only relay addresses that you added to them explicitly. So if you added foo.com into postmark, postmark will only relay email address which have From as *@foo.com .

      The idea of mail forwarding is that the From address has to be that of the original. So, the From address has to set to say someone@posteo.com . Postmark will reject these emails (correctly).

      So to summarize: domain-locked relays and keeping the original sender on forwards/lists do not go together. You can relay or you can transparently forward third-party mail, not both. There's nothing Cloudron can do about this from what I know.

      Thanks for the explainer @girish. Does that means one cannot use an external relay to replace the built in SMTP server if we use mailing lists (or the mailbox + forward implementation in Cloudron 10) - given most likely senders and mailing lists members with use random email providers?

      girishG
      girishG
      girish
      Staff
      wrote on last edited by
      #14

      @avatar1024 said:

      Does that means one cannot use an external relay to replace the built in SMTP server if we use mailing lists (or the mailbox + forward implementation in Cloudron 10) - given most likely senders and mailing lists members with use random email providers?

      Yes, with a typical smart host / relay you cannot keep the original sender on list/forward delivery to Gmail/Posteo/etc.

      I want to mention that this is for the forwarding feature. Forwarding requires From address to be preserved. A mailing list behaves differently. It rewrites From/Reply-To etc and makes itself the originator of the email. This feature was never implemented in Cloudron. The forwarding feature was incorrectly labeled as mailing list and this misnaming is fixed in Cloudron 10.

      I guess we have to look into Distribution lists/mailing lists for the next releases, if you are interested in this. But the From address will change, not sure if it will work for your use case. It's usually meant for group@example.com or list@example.com style workflows.

      avatar1024A 1 Reply Last reply
      2
      • girishG girish

        @avatar1024 said:

        Does that means one cannot use an external relay to replace the built in SMTP server if we use mailing lists (or the mailbox + forward implementation in Cloudron 10) - given most likely senders and mailing lists members with use random email providers?

        Yes, with a typical smart host / relay you cannot keep the original sender on list/forward delivery to Gmail/Posteo/etc.

        I want to mention that this is for the forwarding feature. Forwarding requires From address to be preserved. A mailing list behaves differently. It rewrites From/Reply-To etc and makes itself the originator of the email. This feature was never implemented in Cloudron. The forwarding feature was incorrectly labeled as mailing list and this misnaming is fixed in Cloudron 10.

        I guess we have to look into Distribution lists/mailing lists for the next releases, if you are interested in this. But the From address will change, not sure if it will work for your use case. It's usually meant for group@example.com or list@example.com style workflows.

        avatar1024A
        avatar1024A
        avatar1024
        wrote last edited by
        #15

        @girish said:

        @avatar1024 said:

        Does that means one cannot use an external relay to replace the built in SMTP server if we use mailing lists (or the mailbox + forward implementation in Cloudron 10) - given most likely senders and mailing lists members with use random email providers?

        Yes, with a typical smart host / relay you cannot keep the original sender on list/forward delivery to Gmail/Posteo/etc.

        I want to mention that this is for the forwarding feature. Forwarding requires From address to be preserved. A mailing list behaves differently. It rewrites From/Reply-To etc and makes itself the originator of the email. This feature was never implemented in Cloudron. The forwarding feature was incorrectly labeled as mailing list and this misnaming is fixed in Cloudron 10.

        I guess we have to look into Distribution lists/mailing lists for the next releases, if you are interested in this. But the From address will change, not sure if it will work for your use case. It's usually meant for group@example.com or list@example.com style workflows.

        Thanks Girish, and yes a mailing list feature will be useful for some of my use case.

        I guess the point here is that it's a shame there isn't a way to use an external relay as a blanket replacement (i.e. covering all email features including forwarding) to the built-in SMTP server cause those services have added features to ensure reliable delivery (say when the server has a bad IP rep and gets regularly blocked notably by Microsoft stupid IP range blacklist approach).

        1 Reply Last reply
        1
        • M
          M
          msbt
          App Dev
          wrote last edited by msbt
          #16

          Just chiming in here because I ran into the same problem (i.e. a formerly working Postmark email forwarder for a group of externals is not working anymore, because none of them use the cloudrons' domain). What's the current solution, set up a separate mailinglist app? Or would switching to the internal mailserver solve it?

          Happy Hosting & Web Development

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

            @msbt does postmark have more info on why it is rejecting the email?

            so from all my research on this, forwarding via a smart host (especially postmark) is not solvable. Postmark doesn't allow the envelope from and the email from addresses to mismatch. Fundamentally, this means forwarding will not work the way you want.

            M 1 Reply Last reply
            0
            • girishG girish

              @msbt does postmark have more info on why it is rejecting the email?

              so from all my research on this, forwarding via a smart host (especially postmark) is not solvable. Postmark doesn't allow the envelope from and the email from addresses to mismatch. Fundamentally, this means forwarding will not work the way you want.

              M
              M
              msbt
              App Dev
              wrote last edited by
              #18

              @girish but why was it working on Cloudron 9? It only stopped after upgrading to 10, when addresses got migrated from mailinglist to forwards.

              That's the odd thing, there's not really a proper error message, no suppression in Postmark itself. In the mail logs it just says [cloudron] final rcpt list is ["<group@example.com>","<cc1@somesite.com>","<cc2@gmail.com>"]. The mail arrived at the two cc'ed addresses, but the group@example.com forwards never make it. Maybe because LMTP bypasses the filters?

              Happy Hosting & Web Development

              girishG 1 Reply Last reply
              0
              • M msbt

                @girish but why was it working on Cloudron 9? It only stopped after upgrading to 10, when addresses got migrated from mailinglist to forwards.

                That's the odd thing, there's not really a proper error message, no suppression in Postmark itself. In the mail logs it just says [cloudron] final rcpt list is ["<group@example.com>","<cc1@somesite.com>","<cc2@gmail.com>"]. The mail arrived at the two cc'ed addresses, but the group@example.com forwards never make it. Maybe because LMTP bypasses the filters?

                girishG
                girishG
                girish
                Staff
                wrote last edited by
                #19

                @msbt internally, the behavior of the previous mailing list and current forwarding is the same. It was only a rewording to clarify what the feature is doing. So, I think we have to investigate further why it has stopped working in Cloudron 10.

                Don't you see anything on the postmark logs? You should see three separate emails coming to postmark (the to and the two ccs). You should also see the 3 events in the cloudron eventlog. Do you see a mail to group@example.com ?

                1 Reply Last reply
                0
                • M
                  M
                  msbt
                  App Dev
                  wrote last edited by
                  #20

                  @girish no, postmark never sees the group@example.com because it's internal mail

                  Happy Hosting & Web Development

                  girishG 1 Reply Last reply
                  0
                  • M msbt

                    @girish no, postmark never sees the group@example.com because it's internal mail

                    girishG
                    girishG
                    girish
                    Staff
                    wrote last edited by
                    #21

                    @msbt ah, that's why you said LMTP! And nothing in Cloudron eventlog?

                    @james can you help reproduce this please?

                    1 Reply Last reply
                    0
                    • M
                      M
                      msbt
                      App Dev
                      wrote last edited by msbt
                      #22

                      @girish in Cloudron everything looks normal, in the last row it lists the external group mailbox, internal team and the 2 external cc'ed users (cut off), the internal mails get saved, the cc'ed ones sent, but the group never attempts to forward the mails.

                      image.jpeg

                      Happy Hosting & Web Development

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

                        Hello @msbt
                        I need to understand the set up first to reproduce it.

                        1. domain in Cloudron e.g.: cloudron.dev
                        2. mail settings for cloudron.dev smart host configured to use postmark
                        3. 2x mailboxes on Cloudron for group@cloudron.dev and team@cloudron.dev
                          3a. (group|team)@cloudron.dev are configured to forward to e.g.: someinbox@gmail.com
                        4. a mail is sent to (group|team)@cloudron.dev and 2x cc e.g.: cc1@gmail.com and cc2@outlook.com

                        Resulting in:

                        • cc1 and cc2 delivered
                        • group and team saved locally on Cloudron, but never forwarded to someinbox@gmail.com

                        Did I get this right?

                        M 1 Reply Last reply
                        1
                        • jamesJ
                          jamesJ
                          james
                          Staff
                          wrote last edited by james
                          #24

                          Hello @msbt
                          I have tested the following set up on Cloudron 10.0.4:

                          • domain cloudron.dev smart host configured for postmark
                          • local inbox groupone@cloudron.dev owned by a group named groupone
                          • local inbox grouptwo@cloudron.dev owned by a group named grouptwo

                          Forward settings:

                          • groupone@cloudron.dev forward settings to grouptwo@cloudron.dev and external@gmail.com
                          • grouptwo@cloudron.dev forward settings to external@outlook.com

                          Sending a mail to groupone@cloudron.dev is delivered to:

                          • groupone@cloudron.dev
                          • grouptwo@cloudron.dev
                          • external@gmail.com
                          • external@outlook.com

                          From this set up I was not able to reproduce your issue.

                          1 Reply Last reply
                          1
                          • jamesJ james

                            Hello @msbt
                            I need to understand the set up first to reproduce it.

                            1. domain in Cloudron e.g.: cloudron.dev
                            2. mail settings for cloudron.dev smart host configured to use postmark
                            3. 2x mailboxes on Cloudron for group@cloudron.dev and team@cloudron.dev
                              3a. (group|team)@cloudron.dev are configured to forward to e.g.: someinbox@gmail.com
                            4. a mail is sent to (group|team)@cloudron.dev and 2x cc e.g.: cc1@gmail.com and cc2@outlook.com

                            Resulting in:

                            • cc1 and cc2 delivered
                            • group and team saved locally on Cloudron, but never forwarded to someinbox@gmail.com

                            Did I get this right?

                            M
                            M
                            msbt
                            App Dev
                            wrote last edited by msbt
                            #25

                            @james thanks for testing! In my setup the groupone@ is a regular user with 40 forwarding addresses and grouptwo@ is a shared mailbox without any forwards, but other than that you're right.

                            So the only difference is that groupone is owned by a single user, not a group and grouptwo is a shared mailbox with no forwards.

                            I can't imagine how single user vs group owners would make a difference. Did you chance anything else, like FROM address validation? Keep a copy in the inbox? Restrict senders?

                            Happy Hosting & Web Development

                            jamesJ girishG 2 Replies Last reply
                            0
                            • M msbt

                              @james thanks for testing! In my setup the groupone@ is a regular user with 40 forwarding addresses and grouptwo@ is a shared mailbox without any forwards, but other than that you're right.

                              So the only difference is that groupone is owned by a single user, not a group and grouptwo is a shared mailbox with no forwards.

                              I can't imagine how single user vs group owners would make a difference. Did you chance anything else, like FROM address validation? Keep a copy in the inbox? Restrict senders?

                              jamesJ
                              jamesJ
                              james
                              Staff
                              wrote last edited by
                              #26

                              Hello @msbt

                              image.jpeg
                              All default.

                              1 Reply Last reply
                              1
                              • M
                                M
                                msbt
                                App Dev
                                wrote last edited by msbt
                                #27

                                @james can you try again without the "Keep a copy in the inbox", that's the only difference I'm seeing

                                edit: and maybe remove grouptwo from forwarding as well, but again, no idea how that could make a difference 😆

                                Happy Hosting & Web Development

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

                                  Hello @msbt
                                  No difference. Still working just fine.

                                  1 Reply Last reply
                                  1
                                  • M msbt

                                    @james thanks for testing! In my setup the groupone@ is a regular user with 40 forwarding addresses and grouptwo@ is a shared mailbox without any forwards, but other than that you're right.

                                    So the only difference is that groupone is owned by a single user, not a group and grouptwo is a shared mailbox with no forwards.

                                    I can't imagine how single user vs group owners would make a difference. Did you chance anything else, like FROM address validation? Keep a copy in the inbox? Restrict senders?

                                    girishG
                                    girishG
                                    girish
                                    Staff
                                    wrote last edited by girish
                                    #29

                                    @msbt said:

                                    @james thanks for testing! In my setup the groupone@ is a regular user with 40 forwarding addresses and grouptwo@ is a shared mailbox without any forwards, but other than that you're right.

                                    This stood out. There is a cap of 64 forwards in the code. Could you be hitting this limit? Specifically sieve_max_redirects is 64 . I thought this was a very high number, may be not?

                                    1 Reply Last reply
                                    0
                                    • M
                                      M
                                      msbt
                                      App Dev
                                      wrote last edited by
                                      #30

                                      @girish unsure, it really is 40. Would there be something in a log and if so, where? 😉

                                      Happy Hosting & Web Development

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

                                        @msbt the errors if any should be in /run/dovecot/dovecot.log or the main docker logs -f mail . You can also check if the mail is stuck in the mail queue at /app/data/haraka-queue (these are mails which are being "retried") .

                                        1 Reply Last reply
                                        0
                                        • M
                                          M
                                          msbt
                                          App Dev
                                          wrote last edited by
                                          #32

                                          @girish thanks, the queue is empty and the dovecot.log only has yesterday and todays events in there. I'll ask the people to do a test, they switched to manual bcc as a workaround atm

                                          Happy Hosting & Web Development

                                          1 Reply Last reply
                                          0
                                          • M msbt referenced this topic

                                          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