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);
}

Postfix: sending email copies of all incoming and outgoing mails to another domain or account

How to send an BCC copy of every incoming and outgoing email to another account? This is fairly simple to do with postfix. First open you main.cf and add or edit following lines:

# vim /etc/postfix/main.cf

now add these two lines:

sender_bcc_maps = regexp:/etc/postfix/archive_domain
recipient_bcc_maps = regexp:/etc/postfix/archive_domain

just a small explanation:

sender_bcc_maps is a regex based text file containing the mapping for outgoing mail
recipient_bcc_maps is a regex based text file containing the mappings for incoming mail

and here is an example line in the archive_domain file:

/^([^@]+)\@example\.com$/    $1@archive.example.com

the above line explained: every user @example.com will have a BCC copy send to that user @archive.example.com