Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Issues getting SMTP Notifications working

    Scheduled Pinned Locked Moved General pfSense Questions
    10 Posts 5 Posters 733 Views
    Loading More Posts
    • 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.
    • T
      tadl
      last edited by tadl

      Hi,

      Apologies if I've not posted this to the correct area.

      I've been trying to get SMTP Notifications working on 2.7.0.

      I've installed ACME and successfully configured a wildcard cert and applied it.
      I configured the cert with example.com *.example.com and *.homelab.example.com

      When I test the SMTP settings I get the following error: Could not send the message to blah@example.com -- Error: Failed to connect to ssl://smtp.example.com:587 [SMTP: Failed to connect socket: fsockopen(): Unable to connect to ssl://smtp.example:587 (Unknown error) (code: -1, response: )]

      I can successfully telnet to the mailserver on port 587 from the command line on the router.

      Any helpful suggestions greatly appreciated.

      Bob.DigB S GertjanG 3 Replies Last reply Reply Quote 0
      • Bob.DigB
        Bob.Dig LAYER 8 @tadl
        last edited by

        @tadl You don't need a certificate to send those notifications in the first place.

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          You installed that cert on your own mail server?

          T 1 Reply Last reply Reply Quote 0
          • T
            tadl @stephenw10
            last edited by

            @stephenw10 it’s been installed for the web GUI so far.

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Ok so I assume you are using example.com only as an example? You have your own domain you're using?

              You don't need a client cert to connect to smtp.

              You are trying to connect to an smtp server at your domain. Is that not your server?

              T 1 Reply Last reply Reply Quote 0
              • S
                SteveITS Galactic Empire @tadl
                last edited by

                @tadl try unchecking the SSL option.

                Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                Upvote 👍 helpful posts!

                T 1 Reply Last reply Reply Quote 0
                • T
                  tadl @stephenw10
                  last edited by

                  @stephenw10 correct, sorry for not making that clear.

                  I have my own domain, mail is via a third party mail server, & I’ve followed instructions for sending mail via SMTP by generating a token/app password for use with the sending/from address.

                  1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan @tadl
                    last edited by

                    Compare

                    @tadl said in Issues getting SMTP Notifications working:

                    Error: Failed to connect to ssl://smtp.example.com:587

                    with

                    @tadl said in Issues getting SMTP Notifications working:

                    I can successfully telnet to the mailserver on port 587

                    The first is TLS (SSL) and the second uses non-SSL, which is correct : 587 is not encrypted at the start.
                    It can, after connection, if the START-TLS server capability is available, use TLS.
                    pfSense will issue a START-TLS if this is the case.

                    A pure, from the start, TLS connection can be used with smtp, server port 465.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      tadl @SteveITS
                      last edited by

                      @SteveITS I’ve tried the various SSL/TLS options with plain or login, but no luck.

                      1 Reply Last reply Reply Quote 0
                      • T
                        tadl @Gertjan
                        last edited by

                        @Gertjan Thank you.

                        The requirements are Port 587, Auth method is Plain, with STARTTLS

                        @SteveITS I've just tried it again, without Enable SMTP over SSL/TLS or Validate the SSL/TLS certificate presented by the server enabled, and it worked...

                        I thought I'd tried that earlier and it failed, not sure what I've tried now, been messing about with it for so long :)

                        But thanks everyone, all good now.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.