Announcement

Collapse
No announcement yet.

Sending email fails SSL?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sending email fails SSL?

    I have recently switched my small business server to NethServer and I'm no longer able to send emails from homeseer. I'm able to send emails from my freenas box using port 25, TLS, and user authentication. However any settings I try in homeseer fails.

    I can recieve using the pop connector but I cant send.

    I see errors like:
    Exception sending email via server.domain.com (To:user@domain.com, cc:, bcc:, Sub:Homeseer Message, Attach = Authenticate as SSL client failed. You might be connecting to non SSL port.

    Even though the SSL checkbox is not checked. Why is it trying to connect via SSL if SSL checkbox isn't checked?
    https://forums.homeseer.com/forum/de...plifier-plugin

    #2
    So I installed Thunderbird on my homeseer Ubuntu machine and I'm able to send email without any problems. I can't believe homeseer cant do something as simple as send an email. Very sad.
    https://forums.homeseer.com/forum/de...plifier-plugin

    Comment


      #3
      Are you still having this problem? I was having a similar issue and resolved it by ensuring I was connecting to the correct port on the SMTP server. Specifically I had to connect to port 465 instead of 587 on the email server. Port 587 is usually used for STARTTLS, which means the connection starts out insecure but is later upgraded to a secure connection. This is the new standard, so most SMTP providers will recommend/advertise that you use this. However, The HS3 doesn't work with this, you need to use a port that only accepts connections that are TLS-encrypted from the get-go. Which is often port 465.

      If that doesn't work you might also need to update the certificates store using the "mozroots" and "certmgr" commands.

      Comment


        #4
        Classic symptoms of a need to update Mono. Not sure what version you're using but it's at 5.12 now. If your Linux Distro has an older version in its repo you'll have to manually add a signing key from the Mono development site to get it.

        Comment


          #5
          Here a few years ago did test gmail use on the Homeseer 3 box. That said in the Windows Homeseer 2 days went to using STunnel for Windows and over the years switched over to using STunnel for Linux. It continues to work just fine today. I have it installed on the HS3 Pro Linux box and it is also utilized as an email proxy for the Homeseer 3 lite box. The STunnel logging is very chatty kathy were you can see every step of the process.

          Relating to Mono updating / upgrading on the HS3 Ubuntu boxes these updates have all been some where between 250-300 Mono updates including certificates updating.

          ICS-HS3Pro:~# mono -V
          Mono JIT compiler version 5.12.0.226 (tarball Thu May 3 09:48:32 UTC 2018)
          Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
          TLS: __thread
          SIGSEGV: altstack
          Notifications: epoll
          Architecture: amd64
          Disabled: none
          Misc: softdebug
          Interpreter: yes
          LLVM: supported, not enabled.
          GC: sgen (concurrent by default)
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment


            #6
            Originally posted by concordseer View Post
            Classic symptoms of a need to update Mono. Not sure what version you're using but it's at 5.12 now. If your Linux Distro has an older version in its repo you'll have to manually add a signing key from the Mono development site to get it.
            This is sort of offtopic, but I'm running HS3 on the HomeTroller Zee S2, which is the prepackaged raspberry-pi version sold by HomeSeer. So for me, the Linux Distro is the version that HomeSeer put on it when they shipped it to me, which appears to be Raspbian 8.0. With this setup, am I responsible for updating mono myself, or does the update mechanism within HS3 manage this? I'm a bit leery of doing updates on the system because I'm afraid that it might break the update mechanism, and I didn't really see any documentation from HomeSeer that described who's responsible for updating what piece of this.

            Comment


              #7
              Welcome to the Homeseer forum staktrace.

              am I responsible for updating mono myself, or does the update mechanism within HS3 manage this?

              no

              The only update mechanism present Homeseer is to update the software Homeseer and Homeseer Plugins (PI's).

              I'm a bit leery of doing updates on the system because I'm afraid that it might break the update mechanism, and I didn't really see any documentation from HomeSeer that described who's responsible for updating what piece of this.

              The updating of Homeseer has nothing to do with updating the Raspberian OS or Mono.

              The current OS build of Wheezy or Jessie on the Zee2 should continue to work fine and typically will not debend HS3. The Zee2 is built as an untouchable appliance with a standard build of Raspberian and Mono.

              Over the years the Zee / Zee2 have had both had recent releases of an OS and Mono.

              Those that are familiar with Linux or Raspberian typically do update / upgrade their stuff. Many just DIY new builds. It is very easy to do.

              The RPi is a nice learning computer and reasonably priced Linux box. You cannot break it.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #8
                I spent over an hour trying to get email sending to work with HS3 on the latest Linux release (3.0.0.449). It simply doesn't work with a gmail destination or with Outlook.com (smtp-mail.outlook.com or smtp.outlook365.com) via SSL on port 587 or port 465. No errors are logged, but I get no email from either service.

                I finally just gave up because there is a relatively simply solution for Linux-based HS3 systems that's pretty much guaranteed to work: use a local MTA ('mail transport agent') like sendmail, postfix or exim4. I chose exim4 because it's (relatively) easy to configure (especially compared to <shudder> sendmail).

                After installing the most basic default configuration for exim4 (one that comes out of the box), the ONLY thing I needed to do was to add an entry in /etc/aliases for the local user I wanted to use to 'proxy' emails from the HS3 host to my regular email address.

                Specifically, I created a local Linux user called 'hs3' and then added the following line to /etc/aliases:

                hs3: mark@xxxx.com (I'm just obfuscating my domain to fend off robot trawlers -- that's simply my regular email address in the file).

                Next, I configured the 'E-Mail Settings Sending' to:
                SMTP Server: localhost
                SMTP Server Port: 25
                SMTP Username: <blank>
                SMTP Password: <whatever, doesn't matter>
                Mail Domain: <blank>
                Default From address: <anything, as long as it LOOKS like a valid email address>
                Use SSL: <unchecked>
                Default "TO" E-Mail address: hs3

                Default subject and message can be whatever you like.

                This worked on the first try.

                I have no requirement for receiving emails right now so I've not tried to fiddle with that configuration.

                Comment


                  #9
                  While that will probably work, you should watch out for two things: (1) that your exim4 installation isn't acting as an open relay (i.e. that it will disallow random external hosts to connect to it and send email) so that you don't unwittingly become a spammer. You can do this by verifying that you cannot connect to port 25 from outside your LAN, or that if you can, exim4 will refuse to forward mail. (2) your IP address doesn't end up on a blocklist, because then sending mail the way you're doing it might start silently failing. This is one of the main advantages of using an external relay like gmail or your ISP's mail server, because they are much better at monitoring for spam and not ending up on a blocklist.

                  Comment


                    #10
                    Originally posted by MarkHargrove View Post
                    I spent over an hour trying to get email sending to work with HS3 on the latest Linux release (3.0.0.449). It simply doesn't work with a gmail destination or with Outlook.com (smtp-mail.outlook.com or smtp.outlook365.com) via SSL on port 587 or port 465. No errors are logged, but I get no email from either service.

                    I finally just gave up because there is a relatively simply solution for Linux-based HS3 systems that's pretty much guaranteed to work: use a local MTA ('mail transport agent') like sendmail, postfix or exim4. I chose exim4 because it's (relatively) easy to configure (especially compared to <shudder> sendmail).

                    After installing the most basic default configuration for exim4 (one that comes out of the box), the ONLY thing I needed to do was to add an entry in /etc/aliases for the local user I wanted to use to 'proxy' emails from the HS3 host to my regular email address.

                    Specifically, I created a local Linux user called 'hs3' and then added the following line to /etc/aliases:

                    hs3: mark@xxxx.com (I'm just obfuscating my domain to fend off robot trawlers -- that's simply my regular email address in the file).

                    Next, I configured the 'E-Mail Settings Sending' to:
                    SMTP Server: localhost
                    SMTP Server Port: 25
                    SMTP Username: <blank>
                    SMTP Password: <whatever, doesn't matter>
                    Mail Domain: <blank>
                    Default From address: <anything, as long as it LOOKS like a valid email address>
                    Use SSL: <unchecked>
                    Default "TO" E-Mail address: hs3

                    Default subject and message can be whatever you like.

                    This worked on the first try.

                    I have no requirement for receiving emails right now so I've not tried to fiddle with that configuration.


                    Im trying to set my settings like you exept on SMTP server I'm using mailserver.local (as I have a dedicated mailserver running) but I still get this error, even if "use SSL" is unchecked and port is 25

                    Exception sending email via mailserver.local (To:MY@EMAIL.ADDRESS, cc:, bcc:, Sub:From HomeSeer, Attach: ) = Authenticate as SSL client failed. You might be connecting to non SSL port.

                    Any ideas?

                    And of course in my mailserver unsecure smtp is only available to homeseer IP, so it cant be accessed from the outside.
                    Also I've tried to telnet into mailserver.local on port 25 with no SSL and that works, so the problem has to be in homeseer.

                    Comment


                      #11
                      I also run my own e-mail server on the same box. Naturally, I don't run SSL. In HS setup, I specified my local IP address for the email server as well as authentication information and this works just fine. Perhaps the issue is name resolution.
                      HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                      Comment


                        #12
                        Nope, I just tried to replace mailserver.local with the IP, but I still get the same error.

                        Comment


                          #13
                          I also tried to install postfix on the same box as homeseer to see if I could connect to that, but noooo that generates the same error

                          Comment

                          Working...
                          X