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

    SMTP server on pfSense.

    Scheduled Pinned Locked Moved pfSense Packages
    27 Posts 9 Posters 5.8k 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.
    • A
      apetrenko @Daniel_Hyde
      last edited by

      @daniel_hyde It works, doing deeper testing.
      About the e-mail: I need to send 1-10 e-mails, it is iPMI/iDRAC alerting which can use only plain SMTP to port 25.

      D GertjanG 2 Replies Last reply Reply Quote 0
      • D
        Daniel_Hyde @apetrenko
        last edited by

        @apetrenko

        You can get cloud based relays that can do this, you can pick the port you send on and whether you want or encryption or not.

        Thanks
        Dan

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

          @apetrenko said in SMTP server on pfSense.:

          I need to send 1-10 e-mails,

          A postfix server for

          ... to send 1-10 e-mails (per day)

          why not ditching them into a gmail ? Free phone popup notification as a bonus.

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

          A 1 Reply Last reply Reply Quote 0
          • A
            apetrenko @Gertjan
            last edited by

            @gertjan because you will be surprised when you will try to set it up for iDRAC on Dell Server -- it can send only to plain SMTP to port 25.

            R M 2 Replies Last reply Reply Quote 0
            • R
              rcoleman-netgate Netgate @apetrenko
              last edited by

              @apetrenko You don't want to run SMTP services on your firewall. You could make a VPN tunnel and route SMTP that way if you have to. That's what I've done with mine.

              Ryan
              Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
              Requesting firmware for your Netgate device? https://go.netgate.com
              Switching: Mikrotik, Netgear, Extreme
              Wireless: Aruba, Ubiquiti

              1 Reply Last reply Reply Quote 1
              • S
                SteveITS Galactic Empire @apetrenko
                last edited by

                @apetrenko said in SMTP server on pfSense.:

                I have ~200 IPMI interfaces and each of them need to send logs to port 25 to plain SMTP.

                I would use a hostname those can resolve, and then you can move it to a different SMTP server/IP later.

                I see both sides of the discussion. We used to use the Windows Server SMTP feature before it was removed in 2022, and relay that out to 365 or Google or whatever. Using an internal SMTP allows for queuing messages from pfSense when Internet is down. Having something internal would let pfSense queue those until it connects and can relay out. Access to port 25 could be controlled by firewall rule, though the default LAN:any rule would have it open. Perhaps a separate ACL-type setting.

                Alternately there are plenty of ways to install a free SMTP server on Windows. At some point in life someone recommended hmailserver.com but I haven't really looked at it.

                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!

                1 Reply Last reply Reply Quote 0
                • M
                  mvikman @apetrenko
                  last edited by

                  @apetrenko

                  How old are those Dell servers? According to Dell's instructions, you can set port and authentication for SMTP, atleast on iDRAC7 and newer...

                  pfSense Plus 24.11-RELEASE (amd64)
                  Dell Optiplex 7040 SFF
                  Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                  HPE 561T (X540-AT2), 2-port 10Gb RJ45
                  HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    apetrenko @mvikman
                    last edited by

                    @mvikman authenticated, not encrypted. there is no SSL/TLS support.

                    R M 2 Replies Last reply Reply Quote 0
                    • R
                      rcoleman-netgate Netgate @apetrenko
                      last edited by

                      @apetrenko highly recommend you either configure your own "satellite" SMTP server internally on your network or use a VPN to communicate to one that will work on SMTP port 25 w/o encryption.

                      Ryan
                      Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
                      Requesting firmware for your Netgate device? https://go.netgate.com
                      Switching: Mikrotik, Netgear, Extreme
                      Wireless: Aruba, Ubiquiti

                      1 Reply Last reply Reply Quote 1
                      • M
                        mvikman @apetrenko
                        last edited by mvikman

                        @apetrenko

                        iDRAC9 supports TLS after firmware upgrade, this is from Dell KB Article 000131098:

                        After iDRAC is upgraded to version 4.00.00.00, you may stop receiving encrypted email alerts from iDRAC, if the external email server does not support encryption. iDRAC firmware version 4.00.00.00 introduces a user-selectable encryption option and the default protocol is StartTLS. To start receiving email messages again, disable the email encryption by using the following RACADM command: "racadm set idrac.RemoteHosts.ConnectionEncryption None"

                        pfSense Plus 24.11-RELEASE (amd64)
                        Dell Optiplex 7040 SFF
                        Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                        HPE 561T (X540-AT2), 2-port 10Gb RJ45
                        HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                          @apetrenko said in SMTP server on pfSense.:

                          @gertjan because you will be surprised when you will try to set it up for iDRAC on Dell Server -- it can send only to plain SMTP to port 25.

                          I know.
                          I've an old T350 PowerEdge with an iDRAC, and yes, it has very little capable mail send settings.
                          It presumes an open port 25 and a host name. That was how things were done in the past.

                          f54649ef-b0b4-40eb-968e-f920574f3862-image.png

                          Maybe I can upgrade it .... never looked into that.

                          If I had to, I would ask my NAS to 'play' mail relay : probably way easier/faster to set up.

                          The fact that a simple pfSense upgrade or even patch can disable or break an installed postfix, or an upgrade of pfSense blows postfix out of the water, is a no go.

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

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            apetrenko @Gertjan
                            last edited by

                            Guys, Don't tell me what I should change in my infrastructure, what I have to upgrade, and what I need to do. if you ever certify your infra by PCI/SoC/ISO you probably know, how hard and expensive to "add satellite server to send e-mail" or "upgrade your idrac to V1.23.456.789" in the middle of the complaint period.

                            I found a better and simple solution: https://github.com/wiggin77/mailrelay installed on pfSense.

                            Works well and is exactly what I need: receive an e-mail by plain SMTP inside the network and send it to AWS mail relay by STARTTLS to 587.

                            GertjanG R 2 Replies Last reply Reply Quote 0
                            • GertjanG
                              Gertjan @apetrenko
                              last edited by

                              @apetrenko said in SMTP server on pfSense.:

                              what I have to upgrade

                              Wasn't telling you what to upgrade. Don't know your hardware.
                              And with "PCI/SoC/ISO" all bets are off. Like patching a firewall with a mail server ;)

                              I do like the solution you found ๐Ÿ‘

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

                              1 Reply Last reply Reply Quote 0
                              • bingo600B
                                bingo600
                                last edited by

                                Won't the above solution need some kind of golang runtime/libraries to be installed ??
                                How do you ensure those packages are kept up2date ??

                                If you find my answer useful - Please give the post a ๐Ÿ‘ - "thumbs up"

                                pfSense+ 23.05.1 (ZFS)

                                QOTOM-Q355G4 Quad Lan.
                                CPUย  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                LANย  : 4 x Intel 211, Diskย  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                A 1 Reply Last reply Reply Quote 0
                                • R
                                  rcoleman-netgate Netgate @apetrenko
                                  last edited by

                                  @apetrenko said in SMTP server on pfSense.:

                                  I found a better and simple solution: https://github.com/wiggin77/mailrelay installed on pfSense.

                                  Sideloading packages into pfSense will likely fail or disappear when you upgrade the platform. If you reach out to TAC you will be told to remove any repos and sideloaded programs before we will ever look at your machine.

                                  Ryan
                                  Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
                                  Requesting firmware for your Netgate device? https://go.netgate.com
                                  Switching: Mikrotik, Netgear, Extreme
                                  Wireless: Aruba, Ubiquiti

                                  A 1 Reply Last reply Reply Quote 0
                                  • A
                                    apetrenko @bingo600
                                    last edited by

                                    @bingo600 binary is static. update package -- standard sysadmin task. Right?

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      apetrenko @rcoleman-netgate
                                      last edited by

                                      @rcoleman-netgate since updates are coming no more often than 1 time per 3-5 years, I'm safe on this problem. :) I have an ansible for installing and configuring some 3rd party stuff on my pfsense.

                                      And I don't think USAF will have any interest to my router.
                                      [Tactical Air Command (USAF)]

                                      Question to netgate: why are you so interested to prevent me to use smtp relay on pfSense box? You have no obligation, I'm using the "community edition". Everything on my responsibility. Why are you so much stirred up against my solution?

                                      R jimpJ 2 Replies Last reply Reply Quote 0
                                      • R
                                        rcoleman-netgate Netgate @apetrenko
                                        last edited by

                                        @apetrenko said in SMTP server on pfSense.:

                                        Question to netgate: why are you so interested to prevent me to use smtp relay on pfSense box? You have no obligation, I'm using the "community edition". Everything on my responsibility. Why are you so much stirred up against my solution?

                                        Any add-on to your system comes with its own unknowns and potential security holes that could be exploited.

                                        If you want to keep a fully secure system the best route is to not add outside (untested) binaries and leave yourself secure by putting the job of a mail server onto a ... mail... server... and not a firewall.

                                        Ryan
                                        Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
                                        Requesting firmware for your Netgate device? https://go.netgate.com
                                        Switching: Mikrotik, Netgear, Extreme
                                        Wireless: Aruba, Ubiquiti

                                        1 Reply Last reply Reply Quote 0
                                        • jimpJ
                                          jimp Rebel Alliance Developer Netgate @apetrenko
                                          last edited by

                                          @apetrenko said in SMTP server on pfSense.:

                                          Question to netgate: why are you so interested to prevent me to use smtp relay on pfSense box? You have no obligation, I'm using the "community edition". Everything on my responsibility. Why are you so much stirred up against my solution?

                                          Because this is a security product and e-mail services have a long history of being a gigantic attack surface full of holes and bringing more risk than anyone sane would want to take on. Most other add-on services are either only still around because they're entrenched (and hard to get people to stop using) or because the risk is relatively low by comparison.

                                          If you want to do it, you're on your own. That kind of service does not belong on a firewall.

                                          EOT. Locking.

                                          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                                          Need help fast? Netgate Global Support!

                                          Do not Chat/PM for help!

                                          1 Reply Last reply Reply Quote 1
                                          • jimpJ jimp locked this topic on
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.