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

Gateway down - no notification received via SMTP

Scheduled Pinned Locked Moved General pfSense Questions
33 Posts 8 Posters 8.4k 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.
  • P
    phaze75
    last edited by phaze75 Apr 27, 2019, 7:30 AM Apr 27, 2019, 7:27 AM

    Hi,
    I have configured pfsense to send SMTP notifications via my LAN SMTP server. It works perfectly for the test notification and also for dyndns ip changes. However, pfsense does not notify me if my gateway goes down:

    Apr 27 03:45:35 rc.gateway_alarm 59722 >>> Gateway alarm: WAN_DHCP (Addr:80.109.220.1 Alarm:1 RTT:10.218ms RTTsd:4.909ms Loss:21%)
    Apr 27 03:45:35 check_reload_status updating dyndns WAN_DHCP
    Apr 27 03:45:35 check_reload_status Restarting ipsec tunnels
    Apr 27 03:45:35 check_reload_status Restarting OpenVPN tunnels/interfaces
    Apr 27 03:45:35 check_reload_status Reloading filter
    Apr 27 03:45:36 check_reload_status Linkup starting igb0
    Apr 27 03:45:36 kernel igb0: link state changed to DOWN

    Do I need to activate that somewhere?

    I am using:

    2.4.4-RELEASE-p2 (amd64)
    built on Wed Dec 12 07:40:18 EST 2018
    FreeBSD 11.2-RELEASE-p6

    Best regards!

    C 1 Reply Last reply Apr 27, 2019, 7:25 PM Reply Quote 0
    • M
      MoonKnight
      last edited by Apr 27, 2019, 7:39 AM

      Hi,

      I think you need to install "mailreport" under Package Manager.

      --- 24.11 ---
      Intel(R) Xeon(R) CPU D-1518 @ 2.20GHz
      Kingston DDR4 2666MHz 16GB ECC
      2 x HyperX Fury SSD 120GB (ZFS-mirror)
      2 x Intel i210 (ports)
      4 x Intel i350 (ports)

      1 Reply Last reply Reply Quote 0
      • P
        phaze75
        last edited by Apr 27, 2019, 7:45 AM

        Hi, I checked it out, but "mailreport" just sends out periodic reports. I would like to be instantly notified if the gateway goes down. I read in other articles that this is working for other users with SMTP notifications turned on. Thus I am wondering why it does not work for me...

        1 Reply Last reply Reply Quote 0
        • M
          mrsunfire
          last edited by Apr 27, 2019, 8:15 AM

          If WAN is down, it can't be sent... You need a failover connection for that.

          Netgate 6100 MAX

          1 Reply Last reply Reply Quote 0
          • P
            phaze75
            last edited by Apr 27, 2019, 8:37 AM

            Hmm, why? The LAN interface (still up) and the SMTP server are in the same private subnet. I even configured the static IP of the SMTP server instead of the FQDN to prevent any DNS related issues.

            P 1 Reply Last reply May 4, 2019, 6:41 AM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by johnpoz Apr 27, 2019, 8:59 AM Apr 27, 2019, 8:58 AM

              Do you have pfsense set to reset states on gateway down?

              system / adv / misc

              State Killing on Gateway Failure
              Flush all states when a gateway goes down The monitoring process will flush all states when a gateway goes down if this box is checked.
              

              Wonder if that could conflict with talking to your smtp server?

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • P
                phaze75
                last edited by Apr 27, 2019, 1:34 PM

                Nope.

                de2d99a0-b4e7-4db8-95e2-cf7b69526c09-image.png

                1 Reply Last reply Reply Quote 0
                • M
                  mrsunfire
                  last edited by Apr 27, 2019, 3:18 PM

                  Normally you don‘t need that. If your WAN is down, even a smtp on LAN can‘t send the mail.

                  Netgate 6100 MAX

                  P 1 Reply Last reply Apr 27, 2019, 6:49 PM Reply Quote 0
                  • P
                    phaze75 @mrsunfire
                    last edited by phaze75 Apr 27, 2019, 6:50 PM Apr 27, 2019, 6:49 PM

                    @mrsunfire said in Gateway down - no notification received via SMTP:

                    Normally you don‘t need that. If your WAN is down, even a smtp on LAN can‘t send the mail.

                    So why is it then possible to successfully send and receive a test notification (within the LAN) with a disabled WAN interface?

                    b3f0fd60-2bee-4be9-9db8-a4de64c28f2b-image.png

                    1 Reply Last reply Reply Quote 0
                    • C
                      chpalmer @phaze75
                      last edited by Apr 27, 2019, 7:25 PM

                      @phaze75

                      Assuming that your email server logs never log the email attempt?

                      Triggering snowflakes one by one..
                      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                      P 1 Reply Last reply Apr 28, 2019, 6:57 AM Reply Quote 0
                      • P
                        phaze75 @chpalmer
                        last edited by phaze75 Apr 28, 2019, 7:16 AM Apr 28, 2019, 6:57 AM

                        @chpalmer
                        No, the SMTP server didn't log an email attempt at the incident "Apr 27 03:45:36 kernel igb0: link state changed to DOWN". But it logged my manually triggered SMTP test notifications properly.

                        I suspect pfsense did not try to send an email at all (bug?). What supports this suspicion is that pfsense properly logged my test notification (see below), but it did not log a notification of the "igb0: link state changed to DOWN" incident:

                        Apr 27 09:04:19 php-fpm /system_advanced_notifications.php: Message sent to @****. OK

                        G 1 Reply Last reply May 3, 2019, 9:06 AM Reply Quote 0
                        • M
                          mrsunfire
                          last edited by Apr 28, 2019, 7:32 AM

                          Under System/Advanced/Notifications you're sure you did not check the first box "Disable SMTP"? Sometimes this happens because you think check a box enables something.

                          Netgate 6100 MAX

                          P 1 Reply Last reply Apr 28, 2019, 7:34 AM Reply Quote 0
                          • P
                            phaze75 @mrsunfire
                            last edited by Apr 28, 2019, 7:34 AM

                            @mrsunfire
                            No.
                            7cd9fd26-0a85-433a-a148-b81fbed40c8c-image.png

                            1 Reply Last reply Reply Quote 0
                            • S
                              stephenw10 Netgate Administrator
                              last edited by Apr 28, 2019, 6:09 PM

                              Do you see notifications when the WAN comes back up?

                              Do you see gateway alarms logged when the WAN is down? If you just disable the WAN removing the gateway monitor on it I don't believe you will see an alert.

                              Steve

                              P 1 Reply Last reply Apr 29, 2019, 5:56 AM Reply Quote 0
                              • P
                                phaze75 @stephenw10
                                last edited by phaze75 Apr 29, 2019, 6:03 AM Apr 29, 2019, 5:56 AM

                                @stephenw10 said in Gateway down - no notification received via SMTP:

                                Do you see notifications when the WAN comes back up?

                                No.

                                Do you see gateway alarms logged when the WAN is down?

                                Yes, see my first post. The first line of the log contains the gateway alarm.

                                If you just disable the WAN removing the gateway monitor on it I don't believe you will see an alert.

                                That is clear. I just disabled the WAN manually to prove that SMTP (test) notifications can still be sent by pfsense even if the WAN adapter is down/disabled.

                                I suspect there might be an issue of pfsense preventing a gateway alarm to trigger the corresponding SMTP notification.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  stephenw10 Netgate Administrator
                                  last edited by Apr 29, 2019, 11:07 AM

                                  You don't have gateway action disabled in the gateway setup?

                                  Though I would still expect the alarm to trigger an alert in that case. Not sure I've ever tested that though.

                                  Steve

                                  P 2 Replies Last reply Apr 30, 2019, 4:50 AM Reply Quote 0
                                  • P
                                    phaze75 @stephenw10
                                    last edited by Apr 30, 2019, 4:50 AM

                                    @stephenw10 said in Gateway down - no notification received via SMTP:

                                    You don't have gateway action disabled in the gateway setup?

                                    No. See below.

                                    e2d1f2c1-96f7-497f-ae4b-0d7e51428e89-image.png

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      phaze75 @stephenw10
                                      last edited by May 3, 2019, 6:05 AM

                                      @stephenw10 So, where do we go from here? Should I file a bug?

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        Gertjan @phaze75
                                        last edited by May 3, 2019, 9:06 AM

                                        I guess this is it :
                                        @phaze75 said in Gateway down - no notification received via SMTP:

                                        I suspect pfsense did not try to send an email at all (bug?)

                                        I took a look at what happens when a gateway (WAN) goes down.
                                        I'm pretty sure that there are no mail notifications attempts in that case.

                                        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
                                        • J
                                          johnpoz LAYER 8 Global Moderator
                                          last edited by May 3, 2019, 9:10 AM

                                          This is kind of been a gray area for a while - I am not aware of any docs that spell out what triggers a notification.

                                          Would be a nice if there was some doc listing what exactly will trigger a smtp notification... Better yet would be a way to toggle different notifications on or off..

                                          Notification of wan down is prob never thought of since more than likely smtp notification would be going to outside smtp server. I just use a "free" outside monitoring service that send me email when it can not ping my wan IP..

                                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                                          If you get confused: Listen to the Music Play
                                          Please don't Chat/PM me for help, unless mod related
                                          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                          1 Reply Last reply Reply Quote 1
                                          20 out of 33
                                          • First post
                                            20/33
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received