pfSense 2.3 STARTTLS email notification problem

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 this in a future version:

open file /etc/inc/smtp.inc and find the following lines:

if($this->debug)
    $this->OutputDebug('Starting TLS cryptograpic protocol');
############## ADD THIS BEGIN ########################
stream_context_set_option($this->connection, [
    "ssl" => [
        "verify_peer" => false,
        "verify_peer_name" => false,
        "allow_self_signed" => true
    ]
]);
############## ADD THIS END ##########################
if(!($success = @stream_socket_enable_crypto($this->connection,1,STREAM_CRYPTO_METHOD_TLS_CLIENT)))
    $this->error = 'could not start TLS connection encryption protocol';
else
{
    if($this->debug)
        $this->OutputDebug('TLS started');
    $success = $this->StartSMTP($localhost);
}

Installing PySide 1.2.4 on Ubuntu 14.04 LTS

Installing PySide 1.2.4 is quite easy and also has phonon support. Simply copy and paste following lines (line by line) to your terminal:

# sudo apt-get install build-essential git cmake libqt4-dev libphonon-dev python2.7-dev libxml2-dev libxslt1-dev qtmobility-dev libqtwebkit-dev python-pip
# pip install --upgrade wheel
# wget https://pypi.python.org/packages/source/P/PySide/PySide-1.2.4.tar.gz
# tar -xvzf PySide-1.2.4.tar.gz
# cd PySide-1.2.4
# python setup.py bdist_wheel --qmake=/usr/bin/qmake-qt4 --standalone
# pip install dist/PySide-1.2.4-cp27-none-linux-x86_64.whl