{"action":"created","issue":{"url":"https://api.github.com/repos/georchestra/georchestra/issues/1061","labels_url":"https://api.github.com/repos/georchestra/georchestra/issues/1061/labels{/name}","comments_url":"https://api.github.com/repos/georchestra/georchestra/issues/1061/comments","events_url":"https://api.github.com/repos/georchestra/georchestra/issues/1061/events","html_url":"https://github.com/georchestra/georchestra/pull/1061","id":105370486,"number":1061,"title":"Don't use isReachable(), it requires root access for icmp raw sockets…","user":{"login":"landryb","id":3421760,"avatar_url":"https://avatars.githubusercontent.com/u/3421760?v=3","gravatar_id":"","url":"https://api.github.com/users/landryb","html_url":"https://github.com/landryb","followers_url":"https://api.github.com/users/landryb/followers","following_url":"https://api.github.com/users/landryb/following{/other_user}","gists_url":"https://api.github.com/users/landryb/gists{/gist_id}","starred_url":"https://api.github.com/users/landryb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landryb/subscriptions","organizations_url":"https://api.github.com/users/landryb/orgs","repos_url":"https://api.github.com/users/landryb/repos","events_url":"https://api.github.com/users/landryb/events{/privacy}","received_events_url":"https://api.github.com/users/landryb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T12:31:30Z","updated_at":"2015-09-08T12:36:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/georchestra/georchestra/pulls/1061","html_url":"https://github.com/georchestra/georchestra/pull/1061","diff_url":"https://github.com/georchestra/georchestra/pull/1061.diff","patch_url":"https://github.com/georchestra/georchestra/pull/1061.patch"},"body":"… (#991)\r\n\r\nJust check that smtpHost resolves to a valid IP.\r\n\r\nI've tested that InetAddress.getByName() works fine if provided a valid DNS or a valid IP, and throws an exception if provided an invalid DNS.\r\n```\r\n$cat t.java\r\nimport java.net.InetAddress;\r\nimport java.net.UnknownHostException;\r\n\r\npublic class t {\r\n    public static void main(String[] args) {\r\n      String smtpHost = \"smtp.univ-bpclermont.fr\";\r\n      String badSmtpHost = \"this.doesnt.resolve\";\r\n      String smtpIp = \"195.221.122.150\";\r\n      try {\r\n          InetAddress ip = InetAddress.getByName(smtpHost);\r\n          System.out.println(smtpHost + \" resolves to \" + ip.toString());\r\n      } catch (UnknownHostException e) {\r\n           System.out.println(smtpHost + \" doesnt resolve\");\r\n      }\r\n      try {\r\n          InetAddress ip = InetAddress.getByName(badSmtpHost);\r\n          System.out.println(badSmtpHost + \" resolves to \" + ip.toString());\r\n      } catch (UnknownHostException e) {\r\n           System.out.println(badSmtpHost + \" doesnt resolve\");\r\n      }\r\n      try {\r\n          InetAddress ip = InetAddress.getByName(smtpIp);\r\n          System.out.println(smtpIp + \" resolves to \" + ip.toString());\r\n      } catch (UnknownHostException e) {\r\n           System.out.println(smtpIp + \" doesnt resolve\");\r\n      }\r\n    }\r\n}\r\n$java t        \r\nsmtp.univ-bpclermont.fr resolves to smtp.univ-bpclermont.fr/195.221.122.150\r\nthis.doesnt.resolve doesnt resolve\r\n195.221.122.150 resolves to /195.221.122.150\r\n```"},"comment":{"url":"https://api.github.com/repos/georchestra/georchestra/issues/comments/138547004","html_url":"https://github.com/georchestra/georchestra/pull/1061#issuecomment-138547004","issue_url":"https://api.github.com/repos/georchestra/georchestra/issues/1061","id":138547004,"user":{"login":"pmauduit","id":594335,"avatar_url":"https://avatars.githubusercontent.com/u/594335?v=3","gravatar_id":"","url":"https://api.github.com/users/pmauduit","html_url":"https://github.com/pmauduit","followers_url":"https://api.github.com/users/pmauduit/followers","following_url":"https://api.github.com/users/pmauduit/following{/other_user}","gists_url":"https://api.github.com/users/pmauduit/gists{/gist_id}","starred_url":"https://api.github.com/users/pmauduit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmauduit/subscriptions","organizations_url":"https://api.github.com/users/pmauduit/orgs","repos_url":"https://api.github.com/users/pmauduit/repos","events_url":"https://api.github.com/users/pmauduit/events{/privacy}","received_events_url":"https://api.github.com/users/pmauduit/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T12:36:24Z","updated_at":"2015-09-08T12:36:24Z","body":":+1: "}}