This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

how to Check email
#1
hello 
I have a user who asked to receive alarms by email and everything was alright and an email was sent.
after they add a firewall, I can access the remote via ETS, and the email stops sending!
is there a way to check that its a firewall issue 
I am using SL V2.6.1 

regards,
Best Regards,
Reply
#2
Try running this script, change server and port accordingly to yours.

Code:
function checktcp(ip, port)
  local sock = require('socket').tcp()
  sock:settimeout(1)
  local res, err = sock:connect(ip, port)
  sock:close()
  return res, err
end

-- change IP/PORT as needed
res, err = checktcp('smtp.gmail.com', 465)
if res then
  log('connect OK')
else
  log('connect ERROR', err)
end
------------------------------
Ctrl+F5
Reply
#3
(24.08.2021, 13:20)Daniel. Wrote: Try running this script, change server and port accordingly to yours.

Code:
function checktcp(ip, port)
  local sock = require('socket').tcp()
  sock:settimeout(1)
  local res, err = sock:connect(ip, port)
  sock:close()
  return res, err
end

-- change IP/PORT as needed
res, err = checktcp('smtp.gmail.com', 465)
if res then
  log('connect OK')
else
  log('connect ERROR', err)
end

thanks, Daniel
I got this in the log: 


* arg: 1
  * string: connect ERROR
* arg: 2
  * string: Host is unreachable


so its firewall issue
Best Regards,
Reply
#4
It looks like yes
------------------------------
Ctrl+F5
Reply


Forum Jump: