Gateway Email notifications not consistent
-
Im on 2.4.2_1, and for some reason the email notifications are not working consistently. i have the notifications setup to use gmail, and tests are successful.
however, when the gateway goes down (or enters alert state), i do not get the notifications. when it comes back up (or resumes from alert state) i get a notification that the gateway is back up.
looking at the log, i have for the failed send on gateway trouble:
rc.dyndns.update: Could not send the message to xxxx@gmail.com – Error: Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) (code: -1, response: )]
then, a few seconds later, for the gateway online:
/rc.dyndns.update: Message sent to xxxx@gmail.com OK
the only thing i can assume is that it's failing to send the alert because the gateway is in the down or alert state, and is not using the failed to gateway to send the message out. if that is the case, is there a way i can set a delay on when it sends the email, say 10 seconds, so it fails to the other gateway? i have the option to flush all states when a gateway goes down. not sure if that helps or hurts.
-
+1 for this. I also experience loss of notifications due to flaky adsl wan lines. There should be a way to check first if the notification can be fulfilled, if not - postpone the notification and try again (with check) later. The retry interval should be a configurable value.
Additionally - repeated notifications should be collected into one single message. So for instance if there are multiple notifications within the retry window, they should be sent as one single notification, concatenated into a single message.
Possible solution:
1. try to send notif
2. if fails, echo it to a temp file, and set a retry flag
3. next time it needs to be retried, read the file and try to send itAny notifications failing would be echoed to the temp file, next time it succeedes, it will send the whole file as a message.
Or something similar… -
Im on 2.4.2_1, and for some reason the email notifications are not working consistently. i have the notifications setup to use gmail, and tests are successful.
however, when the gateway goes down (or enters alert state), i do not get the notifications. when it comes back up (or resumes from alert state) i get a notification that the gateway is back up.
looking at the log, i have for the failed send on gateway trouble:
rc.dyndns.update: Could not send the message to xxxx@gmail.com – Error: Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) (code: -1, response: )]
then, a few seconds later, for the gateway online:
/rc.dyndns.update: Message sent to xxxx@gmail.com OK
the only thing i can assume is that it's failing to send the alert because the gateway is in the down or alert state, and is not using the failed to gateway to send the message out. if that is the case, is there a way i can set a delay on when it sends the email, say 10 seconds, ….
You are aware of the fact that the gateway isn't down at all ? It's unreachable, because your WAN link is down.
Sending mails - or doing what so ever - at that moment isn't possible.
The mail will leave the system some time after the links comes up again. Don't know what "some time is" (should read the manual for that - can't figure it out walking through /etc/inc/notices.php).so it fails to the other gateway?
You have two WAN connections ?
@robi : You're probably right : an smtp message that can't be relayed to a server won't be cached for later retry.
-
2.4.3 has significant changes in notification handling, it's worth another shot there.
But you should also enable default gateway switching if you haven't yet.
-
@Gertjan: sorry, yes i have two wan connections. i was referring to them as they are in the status/gateways and the gateway groups. i have one on tier 1, and the other on tier 2, so it should fail over (which it does). the problem is the gateway down notification. i never receive those, only gateway up notifications:
MONITOR: WANGW is available now, adding to routing group WAN_Group 8.8.8.8
@jimp: i'll set default gateway switching and if that doesnt help will try 2.4.3.