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. Support
  3. Outbound SMTP (Transactional Email) Stopped Working - Invalid login: 535 Authentication failed

Outbound SMTP (Transactional Email) Stopped Working - Invalid login: 535 Authentication failed

Scheduled Pinned Locked Moved Solved Support
mailgunsmtprelay
20 Posts 6 Posters 302 Views 6 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.
  • W Offline
    W Offline
    wmlutz
    wrote on last edited by
    #3

    @joseph it worked fine a few weeks ago. I'm US based and haven't used any of the eu accounts/servers.

    Screenshot 2025-03-26 at 10.07.38 AM.png

    1 Reply Last reply
    0
    • J Offline
      J Offline
      joseph
      Staff
      wrote on last edited by
      #4

      @wmlutz can you test using swaks cli? https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/#send-via-smtp . swaks is already installed on cloudron server.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wmlutz
        wrote on last edited by wmlutz
        #5

        OK, cool I just ran this:

        swaks --auth \
               --server smtp.mailgun.org \
               --au postmaster@mail.tjspto.org \
               --ap PASSWORD \
               --to my-personal-email@gmail.com \
               --h-Subject: "Hello" \
               --body 'Testing some Mailgun awesomness!'
        === Trying smtp.mailgun.org:25...
        *** Error connecting to smtp.mailgun.org:25:
        ***     IO::Socket::INET: connect: timeout
        root@17221886-0501-4fa4-8aeb-8a3025067e25:/# 
        

        Does that help?

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wmlutz
          wrote on last edited by
          #6

          I also tried the other ports:

          root@17221886-0501-4fa4-8aeb-8a3025067e25:/# swaks --auth \
                 --server smtp.mailgun.org:465 \
                 --au postmaster@mail.tjspto.org \
                 --ap PASSWORD \
                 --to my-personal-email@gmail.com \
                 --h-Subject: "Hello" \
                 --body 'Testing some Mailgun awesomness!'
          === Trying smtp.mailgun.org:465...
          === Connected to smtp.mailgun.org.
          <** Timeout (30 secs) waiting for server response
           -> QUIT
          <** HTTP/1.1 400 Bad Request
          <** Content-Type: text/plain; charset=utf-8
          <** Connection: close
          <** 
          *** Remote host closed connection unexpectedly.
          root@17221886-0501-4fa4-8aeb-8a3025067e25:/# swaks --auth \
                 --server smtp.mailgun.org:587 \
                 --au postmaster@mail.tjspto.org \
                 --ap PASSWORD \
                 --to my-personal-email@gmail.com \
                 --h-Subject: "Hello" \
                 --body 'Testing some Mailgun awesomness!'
          === Trying smtp.mailgun.org:587...
          === Connected to smtp.mailgun.org.
          <-  220 Mailgun Influx ready
           -> EHLO 17221886-0501-4fa4-8aeb-8a3025067e25
          <-  250-dc25da1f3901
          <-  250-AUTH PLAIN LOGIN
          <-  250-SIZE 52428800
          <-  250-8BITMIME
          <-  250-SMTPUTF8
          <-  250-PIPELINING
          <-  250 STARTTLS
           -> AUTH LOGIN
          <-  334 VXNlcm5hbWU6
           -> cG9zdG1hc3RlckBtYWlsLnRqc3B0by5vcmc=
          <-  334 UGFzc3dvcmQ6
           -> NjIxNWJhOGYyZTZmMDFkZGE0MjAyZTZhYTEyMjM5MjQtZjYyMDIzNzQtMzNjYjQzZWY=
          <** 535 Authentication failed
           -> AUTH PLAIN AHBvc3RtYXN0ZXJAbWFpbC50anNwdG8ub3JnADYyMTViYThmMmU2ZjAxZGRhNDIwMmU2YWExMjIzOTI0LWY2MjAyMzc0LTMzY2I0M2Vm
          *** Remote host closed connection unexpectedly.
          
          J 1 Reply Last reply
          0
          • W wmlutz

            I also tried the other ports:

            root@17221886-0501-4fa4-8aeb-8a3025067e25:/# swaks --auth \
                   --server smtp.mailgun.org:465 \
                   --au postmaster@mail.tjspto.org \
                   --ap PASSWORD \
                   --to my-personal-email@gmail.com \
                   --h-Subject: "Hello" \
                   --body 'Testing some Mailgun awesomness!'
            === Trying smtp.mailgun.org:465...
            === Connected to smtp.mailgun.org.
            <** Timeout (30 secs) waiting for server response
             -> QUIT
            <** HTTP/1.1 400 Bad Request
            <** Content-Type: text/plain; charset=utf-8
            <** Connection: close
            <** 
            *** Remote host closed connection unexpectedly.
            root@17221886-0501-4fa4-8aeb-8a3025067e25:/# swaks --auth \
                   --server smtp.mailgun.org:587 \
                   --au postmaster@mail.tjspto.org \
                   --ap PASSWORD \
                   --to my-personal-email@gmail.com \
                   --h-Subject: "Hello" \
                   --body 'Testing some Mailgun awesomness!'
            === Trying smtp.mailgun.org:587...
            === Connected to smtp.mailgun.org.
            <-  220 Mailgun Influx ready
             -> EHLO 17221886-0501-4fa4-8aeb-8a3025067e25
            <-  250-dc25da1f3901
            <-  250-AUTH PLAIN LOGIN
            <-  250-SIZE 52428800
            <-  250-8BITMIME
            <-  250-SMTPUTF8
            <-  250-PIPELINING
            <-  250 STARTTLS
             -> AUTH LOGIN
            <-  334 VXNlcm5hbWU6
             -> cG9zdG1hc3RlckBtYWlsLnRqc3B0by5vcmc=
            <-  334 UGFzc3dvcmQ6
             -> NjIxNWJhOGYyZTZmMDFkZGE0MjAyZTZhYTEyMjM5MjQtZjYyMDIzNzQtMzNjYjQzZWY=
            <** 535 Authentication failed
             -> AUTH PLAIN AHBvc3RtYXN0ZXJAbWFpbC50anNwdG8ub3JnADYyMTViYThmMmU2ZjAxZGRhNDIwMmU2YWExMjIzOTI0LWY2MjAyMzc0LTMzY2I0M2Vm
            *** Remote host closed connection unexpectedly.
            
            J Offline
            J Offline
            joseph
            Staff
            wrote on last edited by
            #7

            @wmlutz try port 587 . usually that is the mail submission port .

            1 Reply Last reply
            0
            • W Offline
              W Offline
              wmlutz
              wrote on last edited by
              #8

              Roger that. Does this help?

              root@17221886-0501-4fa4-8aeb-8a3025067e25:/# swaks --auth \
                     --server smtp.mailgun.org:587 \
                     --au postmaster@mail.tjspto.org \
                     --ap PASSWORD \
                     --to EMAIL \
                     --h-Subject: "Hello" \
                     --body 'Testing some Mailgun awesomness!'
              === Trying smtp.mailgun.org:587...
              === Connected to smtp.mailgun.org.
              <-  220 Mailgun Influx ready
               -> EHLO 17221886-0501-4fa4-8aeb-8a3025067e25
              <-  250-bc2e5756fbc9
              <-  250-AUTH PLAIN LOGIN
              <-  250-SIZE 52428800
              <-  250-8BITMIME
              <-  250-SMTPUTF8
              <-  250-PIPELINING
              <-  250 STARTTLS
               -> AUTH LOGIN
              <-  334 VXNlcm5hbWU6
               -> cG9zdG1hc3RlckBtYWlsLnRqc3B0by5vcmc=
              <-  334 UGFzc3dvcmQ6
               -> NjIxNWJhOGYyZTZmMDFkZGE0MjAyZTZhYTEyMjM5MjQtZjYyMDIzNzQtMzNjYjQzZWY=
              <** 535 Authentication failed
               -> AUTH PLAIN AHBvc3RtYXN0ZXJAbWFpbC50anNwdG8ub3JnADYyMTViYThmMmU2ZjAxZGRhNDIwMmU2YWExMjIzOTI0LWY2MjAyMzc0LTMzY2I0M2Vm
              *** Remote host closed connection unexpectedly.
              root@17221886-0501-4fa4-8aeb-8a3025067e25:/# 
              
              luckowL 1 Reply Last reply
              0
              • W wmlutz

                Roger that. Does this help?

                root@17221886-0501-4fa4-8aeb-8a3025067e25:/# swaks --auth \
                       --server smtp.mailgun.org:587 \
                       --au postmaster@mail.tjspto.org \
                       --ap PASSWORD \
                       --to EMAIL \
                       --h-Subject: "Hello" \
                       --body 'Testing some Mailgun awesomness!'
                === Trying smtp.mailgun.org:587...
                === Connected to smtp.mailgun.org.
                <-  220 Mailgun Influx ready
                 -> EHLO 17221886-0501-4fa4-8aeb-8a3025067e25
                <-  250-bc2e5756fbc9
                <-  250-AUTH PLAIN LOGIN
                <-  250-SIZE 52428800
                <-  250-8BITMIME
                <-  250-SMTPUTF8
                <-  250-PIPELINING
                <-  250 STARTTLS
                 -> AUTH LOGIN
                <-  334 VXNlcm5hbWU6
                 -> cG9zdG1hc3RlckBtYWlsLnRqc3B0by5vcmc=
                <-  334 UGFzc3dvcmQ6
                 -> NjIxNWJhOGYyZTZmMDFkZGE0MjAyZTZhYTEyMjM5MjQtZjYyMDIzNzQtMzNjYjQzZWY=
                <** 535 Authentication failed
                 -> AUTH PLAIN AHBvc3RtYXN0ZXJAbWFpbC50anNwdG8ub3JnADYyMTViYThmMmU2ZjAxZGRhNDIwMmU2YWExMjIzOTI0LWY2MjAyMzc0LTMzY2I0M2Vm
                *** Remote host closed connection unexpectedly.
                root@17221886-0501-4fa4-8aeb-8a3025067e25:/# 
                
                luckowL Offline
                luckowL Offline
                luckow
                translator
                wrote on last edited by
                #9

                @wmlutz this looks like a typo in your credentials

                <** 535 Authentication failed

                Pronouns: he/him | Primary language: German

                W 1 Reply Last reply
                0
                • luckowL luckow

                  @wmlutz this looks like a typo in your credentials

                  <** 535 Authentication failed

                  W Offline
                  W Offline
                  wmlutz
                  wrote on last edited by
                  #10

                  @luckow I verified and re-verified that I have the credentials correct (Mailgun makes you copy it to the clipboard when you make new credentials). Plus the fact that it worked a week ago, and not now . . . that would hint that it's not a credential typo right?

                  luckowL 1 Reply Last reply
                  0
                  • W wmlutz

                    @luckow I verified and re-verified that I have the credentials correct (Mailgun makes you copy it to the clipboard when you make new credentials). Plus the fact that it worked a week ago, and not now . . . that would hint that it's not a credential typo right?

                    luckowL Offline
                    luckowL Offline
                    luckow
                    translator
                    wrote on last edited by
                    #11

                    @wmlutz I have no idea about Mailgun. But IMHO it's ultimately just a smtp endpoint. Try to find out if - say - a Thunderbird smtp setting works. If you can send emails with your email client, everything should work with your Cloudron instance. If not (with the Cloudron instance), you have found an error.

                    Pronouns: he/him | Primary language: German

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      wmlutz
                      wrote on last edited by
                      #12

                      Is there another way to do transactional emails from Ghost that doesn't involve going back to mailgun? Can Cloudron send from a different email address?

                      robiR 1 Reply Last reply
                      0
                      • W wmlutz

                        Is there another way to do transactional emails from Ghost that doesn't involve going back to mailgun? Can Cloudron send from a different email address?

                        robiR Offline
                        robiR Offline
                        robi
                        wrote on last edited by
                        #13

                        @wmlutz search the forum for a gmail integration

                        Conscious tech

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

                          @wmlutz Checkout Postmarkapp.com. They do a great job as long as you separate transactional from broadcast (marketing) messages. I can't speak about Ghost email config, but all you need is their endpoint, port and username/password which looks like Ghost supports. Suggestion: establish a sender signature by adding DKIM, Return-Path DNS records and you can send from any email address on your domain.

                          1 Reply Last reply
                          0
                          • W Offline
                            W Offline
                            wmlutz
                            wrote on last edited by
                            #15

                            @crazybrad thanks for the suggestion. I'm running a little 350 person newsletter for the parent-teacher organization in my town. Postmark looks way overpowered for what I need. There has to be something fundamentally wrong with my GhostCMS and Cloudron setup. @joseph can you point me in the right direction on how to keep troubleshooting?

                            jdaviescoatesJ J 2 Replies Last reply
                            0
                            • W wmlutz

                              @crazybrad thanks for the suggestion. I'm running a little 350 person newsletter for the parent-teacher organization in my town. Postmark looks way overpowered for what I need. There has to be something fundamentally wrong with my GhostCMS and Cloudron setup. @joseph can you point me in the right direction on how to keep troubleshooting?

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

                              @wmlutz said in Outbound SMTP (Transactional Email) Stopped Working - Invalid login: 535 Authentication failed:

                              Postmark looks way overpowered for what I need.

                              @wmlutz Ghost requires Mailgun anyway

                              One thing that's tripped me up in the past (especially after moving server): you need to whitelist your IP in Mailgun, see https://help.mailgun.com/hc/en-us/articles/360012244474-IP-Allowlist

                              Have you already done that? 🙂 If not go here https://app.mailgun.com/settings/ip-access-management to add your server's IP.

                              Also be sure to update the Email address of your app here too to match your support@ address (I can't remember exactly why I needed to do this, but when I moved it from https://bridport.news to https://westdorset.news that was one of the things I ended up needing to do):

                              8d6c2716-17b8-45a9-9599-e7971d526bff-image.png

                              I use Cloudron with Gandi & Hetzner

                              1 Reply Last reply
                              0
                              • W wmlutz

                                @crazybrad thanks for the suggestion. I'm running a little 350 person newsletter for the parent-teacher organization in my town. Postmark looks way overpowered for what I need. There has to be something fundamentally wrong with my GhostCMS and Cloudron setup. @joseph can you point me in the right direction on how to keep troubleshooting?

                                J Offline
                                J Offline
                                joseph
                                Staff
                                wrote on last edited by
                                #17

                                @wmlutz not sure but looks like you can maybe you can reach out to mailgun support and check why it's not working. Maybe something is not activated on their side or the account is not completely active .

                                1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  crazybrad
                                  wrote on last edited by
                                  #18

                                  @wmlutz It's not a matter of scope. Even sending 10 emails could trip the spam filters. And your comment about a newsletter indicates "broadcast" (a/k/a marketing) not transactional. If you are sending the same email to 350 people in the same batch, then this is considered "broadcast"/marketing. It's not my definition, it's how inbox providers see your domain/traffic. You need to use the correct type of traffic or you will eventually be blocked/banned. It doesn't matter about Cloudron config, Mailgun vs. Postmark. Move your traffic to a platform that sends via outbound marketing streams.

                                  1 Reply Last reply
                                  0
                                  • W Offline
                                    W Offline
                                    wmlutz
                                    wrote on last edited by
                                    #19

                                    @jdaviescoates got it! It was the IP allowlist.

                                    Last week I noticed a cloudron error that said:

                                    Server is running out of disk space 2:30 PM
                                    
                                    One or more file systems are running out of space. Please increase the disk size at the earliest.
                                    
                                    /dev/root is at 97% capacity.
                                    

                                    So I attempted to make my EC2 instance bigger (didn't solve the space problem, but that's for another thread). It did however change my IP address. I added the new IP to Mailgun and swaks started working properly in a few minutes.

                                    Side note: @crazybrad I think we're mixing up marketing/bulk and transactional. I use transactional for my ghostcms so I can keep things behind an auth wall, trying to keep kids safe. My parents/members use it rarely, it's not even worth $12/mo compared to mailgun's transactional email cost which is cents/mo.

                                    Thanks to all for the help.

                                    jdaviescoatesJ 1 Reply Last reply
                                    2
                                    • W wmlutz has marked this topic as solved on
                                    • W wmlutz

                                      @jdaviescoates got it! It was the IP allowlist.

                                      Last week I noticed a cloudron error that said:

                                      Server is running out of disk space 2:30 PM
                                      
                                      One or more file systems are running out of space. Please increase the disk size at the earliest.
                                      
                                      /dev/root is at 97% capacity.
                                      

                                      So I attempted to make my EC2 instance bigger (didn't solve the space problem, but that's for another thread). It did however change my IP address. I added the new IP to Mailgun and swaks started working properly in a few minutes.

                                      Side note: @crazybrad I think we're mixing up marketing/bulk and transactional. I use transactional for my ghostcms so I can keep things behind an auth wall, trying to keep kids safe. My parents/members use it rarely, it's not even worth $12/mo compared to mailgun's transactional email cost which is cents/mo.

                                      Thanks to all for the help.

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

                                      @wmlutz said in Outbound SMTP (Transactional Email) Stopped Working - Invalid login: 535 Authentication failed:

                                      @jdaviescoates got it! It was the IP allowlist.

                                      Glad to be of assistance 🙂

                                      @wmlutz said in Outbound SMTP (Transactional Email) Stopped Working - Invalid login: 535 Authentication failed:

                                      mailgun's transactional email cost which is cents/mo.

                                      I don't think I've ever paid anything yet as I've not yet gone over the 1000 free messages a month or whatever it is...

                                      I use Cloudron with Gandi & Hetzner

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