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. Gmail Relay Outbound Mail Closed Connection Whilst Processing

Gmail Relay Outbound Mail Closed Connection Whilst Processing

Scheduled Pinned Locked Moved Solved Support
emailrelayforwardinggmailsmtp
6 Posts 3 Posters 1.3k 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.
  • B Offline
    B Offline
    benostein
    wrote on last edited by
    #1

    Hi everyone,

    I'm having some trouble using the outbound relay feature in cloudron.

    I'm currently running a Ghost app/site within an Oracle Cloud compute instance.

    Oracle block port 25 by default so I have opted for using a relay for outbound mail, using the Google SMTP, which has been setup successfully. This email feature is needed for a Ghost site to invite staff to contribute.

    Here is what the email log displays:

    Aug 12 18:12:20 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF] [core] connect ip=172.18.0.1 port=36236 local_ip=172.18.0.7 local_port=2525
    Aug 12 18:12:21 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF] [helo.checks] multi: true, skip:proto_mismatch(private), host_mismatch(private)
    Aug 12 18:12:21 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF] [core] hook=unrecognized_command plugin=cloudron function=hook_unrecognized_command params=AUTH retval=OK msg=""
    Aug 12 18:12:22 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] sender <no-reply@nononsensevegan.com> code=CONT msg=""
    Aug 12 18:12:23 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [delay_deny] bypassing all pre-DATA deny: AUTH/RELAY
    Aug 12 18:12:23 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] recipient <abc123@gmail.com> code=OK msg="" sender=no-reply@nononsensevegan.com
    Aug 12 18:12:23 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] message mid=<e2cc6808-d444-316a-726c-47ddd17e3440@nononsensevegan.com> size=458 rcpts=1/0/0 delay=0.215 code=CONT msg=""
    Aug 12 18:12:23 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [dkim_sign] signed for nononsensevegan.com
    Aug 12 18:12:23 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] queue code=CONT msg="Message Queued (7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1)"
    Aug 12 18:12:23 [INFO] [-] [core] [outbound] Sending email as a transaction
    Aug 12 18:12:23 [INFO] [-] [core] [outbound] Processing delivery for domain: gmail.com
    Aug 12 18:12:24 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] queue code=OK msg="Message Queued (7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1)"
    Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] client half closed connection ip=172.18.0.1
    Aug 12 18:12:24 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] disconnect ip=172.18.0.1 rdns=NXDOMAIN helo=[127.0.0.1] relay=Y early=N esmtp=Y tls=N pipe=N errors=0 txns=1 rcpts=1/0/0 msgs=1/0/0 bytes=458 lr="" time=5.089
    Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] hook=get_mx plugin=queue/smtp_forward function=get_mx params=gmail.com retval=OK msg="[object Object]"
    Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Looking up A records for: smtp.gmail.com
    Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Attempting to deliver to: 74.125.71.108:465 (0) (4)
    Aug 12 18:12:24 [INFO] [-] [core] [outbound] [outbound::465:74.125.71.108:undefined:50] dispense() clients=1 available=0
    Aug 12 18:12:24 [INFO] [-] [core] [outbound] acquired socket 87F1B09A-CE77-4500-8CE8-FE88B0B86E5E for outbound::465:74.125.71.108:undefined:50
    Aug 12 18:12:28 [GET] /eventlog
    Aug 12 18:12:34 [ERROR] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Remote end 74.125.71.108:465 closed connection while we were processing mail. Trying next MX.
    Aug 12 18:12:35 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Temp failing 1628788343996_1628788343996_0_92_NVEZ02_49_7c2bda5c3a5d for 64 seconds: Tried all MXs
    

    And this is what is displayed within the event log:

    {
      "ts": 1628788344202,
      "type": "queued",
      "direction": "outbound",
      "uuid": "7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1",
      "remote": {
        "ip": "172.18.0.1",
        "port": 36236,
        "host": "NXDOMAIN",
        "info": "NXDOMAIN",
        "closed": false,
        "is_private": true,
        "is_local": false
      },
      "authUser": "no-reply@nononsensevegan.com",
      "mailFrom": "<no-reply@nononsensevegan.com>",
      "rcptTo": [
        "<abc123@gmail.com>"
      ],
      "details": {
        "spamStatus": "",
        "message": "Message Queued (7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1)"
      }
    }
    
    {
      "ts": 1628788355002,
      "type": "deferred",
      "direction": "outbound",
      "uuid": "7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1",
      "mailFrom": "<no-reply@nononsensevegan.com>",
      "rcptTo": [
        "<abc123@gmail.com>"
      ],
      "details": {
        "message": "Tried all MXs",
        "delay": 64
      }
    }
    

    As you can see, the port (465) is open and it attempts to send the email but the connection closes whilst it is processing and am unsure what can be done to fix this.

    Any help is much appreciated!

    girishG 1 Reply Last reply
    0
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #2

      You may need to set up DMARC first with Gmail Postmaster tools for your domain.

      B 1 Reply Last reply
      0
      • robiR robi

        You may need to set up DMARC first with Gmail Postmaster tools for your domain.

        B Offline
        B Offline
        benostein
        wrote on last edited by
        #3

        @robi Thanks for the suggestion! Looks like to setup a DMARC I need a Google organisational account unfortunately and will not work with just a standard account like l have.

        Any more suggestions?

        robiR 1 Reply Last reply
        0
        • B benostein

          @robi Thanks for the suggestion! Looks like to setup a DMARC I need a Google organisational account unfortunately and will not work with just a standard account like l have.

          Any more suggestions?

          robiR Offline
          robiR Offline
          robi
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • B benostein

            Hi everyone,

            I'm having some trouble using the outbound relay feature in cloudron.

            I'm currently running a Ghost app/site within an Oracle Cloud compute instance.

            Oracle block port 25 by default so I have opted for using a relay for outbound mail, using the Google SMTP, which has been setup successfully. This email feature is needed for a Ghost site to invite staff to contribute.

            Here is what the email log displays:

            Aug 12 18:12:20 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF] [core] connect ip=172.18.0.1 port=36236 local_ip=172.18.0.7 local_port=2525
            Aug 12 18:12:21 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF] [helo.checks] multi: true, skip:proto_mismatch(private), host_mismatch(private)
            Aug 12 18:12:21 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF] [core] hook=unrecognized_command plugin=cloudron function=hook_unrecognized_command params=AUTH retval=OK msg=""
            Aug 12 18:12:22 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] sender <no-reply@nononsensevegan.com> code=CONT msg=""
            Aug 12 18:12:23 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [delay_deny] bypassing all pre-DATA deny: AUTH/RELAY
            Aug 12 18:12:23 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] recipient <abc123@gmail.com> code=OK msg="" sender=no-reply@nononsensevegan.com
            Aug 12 18:12:23 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] message mid=<e2cc6808-d444-316a-726c-47ddd17e3440@nononsensevegan.com> size=458 rcpts=1/0/0 delay=0.215 code=CONT msg=""
            Aug 12 18:12:23 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [dkim_sign] signed for nononsensevegan.com
            Aug 12 18:12:23 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] queue code=CONT msg="Message Queued (7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1)"
            Aug 12 18:12:23 [INFO] [-] [core] [outbound] Sending email as a transaction
            Aug 12 18:12:23 [INFO] [-] [core] [outbound] Processing delivery for domain: gmail.com
            Aug 12 18:12:24 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] queue code=OK msg="Message Queued (7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1)"
            Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] client half closed connection ip=172.18.0.1
            Aug 12 18:12:24 [NOTICE] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1] [core] disconnect ip=172.18.0.1 rdns=NXDOMAIN helo=[127.0.0.1] relay=Y early=N esmtp=Y tls=N pipe=N errors=0 txns=1 rcpts=1/0/0 msgs=1/0/0 bytes=458 lr="" time=5.089
            Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] hook=get_mx plugin=queue/smtp_forward function=get_mx params=gmail.com retval=OK msg="[object Object]"
            Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Looking up A records for: smtp.gmail.com
            Aug 12 18:12:24 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Attempting to deliver to: 74.125.71.108:465 (0) (4)
            Aug 12 18:12:24 [INFO] [-] [core] [outbound] [outbound::465:74.125.71.108:undefined:50] dispense() clients=1 available=0
            Aug 12 18:12:24 [INFO] [-] [core] [outbound] acquired socket 87F1B09A-CE77-4500-8CE8-FE88B0B86E5E for outbound::465:74.125.71.108:undefined:50
            Aug 12 18:12:28 [GET] /eventlog
            Aug 12 18:12:34 [ERROR] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Remote end 74.125.71.108:465 closed connection while we were processing mail. Trying next MX.
            Aug 12 18:12:35 [INFO] [7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1] [outbound] Temp failing 1628788343996_1628788343996_0_92_NVEZ02_49_7c2bda5c3a5d for 64 seconds: Tried all MXs
            

            And this is what is displayed within the event log:

            {
              "ts": 1628788344202,
              "type": "queued",
              "direction": "outbound",
              "uuid": "7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1",
              "remote": {
                "ip": "172.18.0.1",
                "port": 36236,
                "host": "NXDOMAIN",
                "info": "NXDOMAIN",
                "closed": false,
                "is_private": true,
                "is_local": false
              },
              "authUser": "no-reply@nononsensevegan.com",
              "mailFrom": "<no-reply@nononsensevegan.com>",
              "rcptTo": [
                "<abc123@gmail.com>"
              ],
              "details": {
                "spamStatus": "",
                "message": "Message Queued (7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1)"
              }
            }
            
            {
              "ts": 1628788355002,
              "type": "deferred",
              "direction": "outbound",
              "uuid": "7C4BFA8B-0725-4B05-9C62-0F6F4B9C75EF.1.1",
              "mailFrom": "<no-reply@nononsensevegan.com>",
              "rcptTo": [
                "<abc123@gmail.com>"
              ],
              "details": {
                "message": "Tried all MXs",
                "delay": 64
              }
            }
            

            As you can see, the port (465) is open and it attempts to send the email but the connection closes whilst it is processing and am unsure what can be done to fix this.

            Any help is much appreciated!

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

            @benostein Cloudron's relay logic only supports port 587 (STARTTLS). Can you try with port 587 instead? Port 465 is TLS which is mostly obsolete.

            B 1 Reply Last reply
            0
            • girishG girish

              @benostein Cloudron's relay logic only supports port 587 (STARTTLS). Can you try with port 587 instead? Port 465 is TLS which is mostly obsolete.

              B Offline
              B Offline
              benostein
              wrote on last edited by
              #6

              @girish Wow that worked perfectly, thank you so much! 😊

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