{"id":813,"date":"2016-05-18T17:44:02","date_gmt":"2016-05-18T15:44:02","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=813"},"modified":"2016-05-18T17:44:02","modified_gmt":"2016-05-18T15:44:02","slug":"pfsense-2-3-starttls-email-notification-problem","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=813","title":{"rendered":"pfSense 2.3 STARTTLS email notification problem"},"content":{"rendered":"<p>\n\tWhen using email notification on pfSense 2.3 with STARTTLS i got the following error:\n<\/p>\n<pre>\nError: could not start TLS connection encryption protocol<\/pre>\n<p>\n\tThis is due to PHP 5.6 which forces the certificate validation as a default. Here is the fix, hope that the upstream developers fix&nbsp;this in a future version:\n<\/p>\n<p>\n\topen file \/etc\/inc\/smtp.inc and find the following lines:\n<\/p>\n<pre>\nif($this-&gt;debug)\n    $this-&gt;OutputDebug(&#39;Starting TLS cryptograpic protocol&#39;);\n############## ADD THIS BEGIN ########################\nstream_context_set_option($this-&gt;connection, [\n    &quot;ssl&quot; =&gt; [\n        &quot;verify_peer&quot; =&gt; false,\n        &quot;verify_peer_name&quot; =&gt; false,\n        &quot;allow_self_signed&quot; =&gt; true\n    ]\n]);\n############## ADD THIS END ##########################\nif(!($success = @stream_socket_enable_crypto($this-&gt;connection,1,STREAM_CRYPTO_METHOD_TLS_CLIENT)))\n    $this-&gt;error = &#39;could not start TLS connection encryption protocol&#39;;\nelse\n{\n    if($this-&gt;debug)\n&nbsp;       $this-&gt;OutputDebug(&#39;TLS started&#39;);\n    $success = $this-&gt;StartSMTP($localhost);\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When using email notification on pfSense 2.3 with STARTTLS i got the following error: Error: could not start TLS connection encryption protocol This is due to PHP 5.6 which forces the certificate validation as a default. Here is the fix, hope that the upstream developers fix&nbsp;this in a future version: open file \/etc\/inc\/smtp.inc and find [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,4,7],"tags":[],"class_list":["post-813","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-programming","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=813"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/813\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}