Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
[SOLVED] system_advanced_notifications.php Could not send the message.
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] system_advanced_notifications.php Could not send the message. (Read 11270 times)
rost
Newbie
Posts: 42
Karma: 4
[SOLVED] system_advanced_notifications.php Could not send the message.
«
on:
April 06, 2015, 10:52:58 am »
opnsense: /system_advanced_notifications.php: Could not send the message to username@mydomain.com -- Error: could not connect to the host "smtp.gmail.com": ??
How to debug this issue?
What is "could not connect"? Wrong password, wrong smtp serv, wrong port, ...
«
Last Edit: April 09, 2015, 07:44:32 am by franco
»
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: system_advanced_notifications.php Could not send the message.
«
Reply #1 on:
April 06, 2015, 03:50:21 pm »
Hi,
It might be that your firewall on the WAN site is blocking smtp traffic, the first thing you should check is if you have a rule on the wan interface allowing smtp (port 25) traffic to the outside world from your firewalls ip address.
If your firewall is open and it still doesn't work, you could test the connectivity from the box itself (using a ssh shell or terminal connection) by starting a telnet connection to gmail:
telnet smtp.gmail.com 25
It should say something like this :
220 mx.google.com ESMTP 12gaygddfasdf - gsmtp
Logged
rost
Newbie
Posts: 42
Karma: 4
Re: system_advanced_notifications.php Could not send the message.
«
Reply #2 on:
April 06, 2015, 04:22:08 pm »
Port Test Results 25
220 mx.google.com ESMTP jp18sm1021109lab.34 - gsmtp
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: system_advanced_notifications.php Could not send the message.
«
Reply #3 on:
April 06, 2015, 04:42:59 pm »
same error? is there any other lead in the log? It might be that gmail is blocking your mails (header issues), but I expect a little more info in the logs then.
Logged
rost
Newbie
Posts: 42
Karma: 4
Re: system_advanced_notifications.php Could not send the message.
«
Reply #4 on:
April 06, 2015, 06:01:05 pm »
opnsense: /system_advanced_notifications.php: Could not send the message to username@domain.com -- Error:
no more additional info in log
use
smtp.gmail.com port 25
STARTTLS
E-Mail auth username and E-Mail auth password
«
Last Edit: April 06, 2015, 06:17:45 pm by rost
»
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: system_advanced_notifications.php Could not send the message.
«
Reply #5 on:
April 07, 2015, 10:58:59 am »
Found the issue, it's suppressing this warning:
Warning: stream_socket_enable_crypto(): Peer certificate CN=`smtp.gmail.com' did not match expected CN=`173.194.65.108' in /usr/local/etc/inc/notices.smtp.inc on line 609
I will push a fix later (we're in a release cycle at the moment, so git is currently frozen).
When this part is fixed, the log tells me "530-5.5.1 Authentication Required. Learn more a", and when putting in credentials for my gmail account google starts complaining about a untrusted client.
I guess when you change your gmail settings it will probably work.
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: system_advanced_notifications.php Could not send the message.
«
Reply #6 on:
April 07, 2015, 09:22:53 pm »
as promised, the fix (disable ssl peer validation, like it was in php5.5) is in
https://github.com/opnsense/core/commit/9a0c07417f37524d22b42f6dc81efeaf404d125f
Logged
pcborges
Newbie
Posts: 19
Karma: 3
Re: [SOLVED] system_advanced_notifications.php Could not send the message.
«
Reply #7 on:
April 20, 2017, 02:47:55 am »
Hi, What do I have to do?
Do I change something on the src/etc/inc/notices.smtp.inc?
Do I have to replace the entire file?
Thanks
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: [SOLVED] system_advanced_notifications.php Could not send the message.
«
Reply #8 on:
April 24, 2017, 02:38:31 pm »
You replied to a thread from two years ago. I'm assuming all the fixes reached version 17.1 so there is no need to manually do anything. Is there anything else in the logs that might help pinpoint this?
Logged
pcborges
Newbie
Posts: 19
Karma: 3
Re: [SOLVED] system_advanced_notifications.php Could not send the message.
«
Reply #9 on:
May 03, 2017, 10:16:21 pm »
Hi, I took some time to test the problem again.
I just installed a test PC with the OPNsense 17.1.5-i386
Set system/settings/notification as below:
server: smtp.gmail.com
port: 587
check Enable STARTTLS
sender: cyberwatchbr@gmail.com
destination: pcborges@yahoo.com
Email auth username: cyberwatchbr@gmail.com
Email auth pass: *****
This setup used to work well.
Now, when I click TEST SMTP I get no mail and the following log entry:
OPNsense opnsense: /system_advanced_notifications.php: Could not send the message to pcborges@yahoo.com -- Error: 534-5.7.14 EX4zifEE_WoNFn8Jfrfj4sQVPTi8TBcSEWDvtyxfFcF4w78dqVm8sCYWvDGxYvuxu4BkQW
Thanks
Paulo Borges
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
[SOLVED] system_advanced_notifications.php Could not send the message.