Setting up Outbound email


I tried creating a private key, and then generate a certificate, and then temporary self-signed the certificate. Should that actually work?

Generate a new private key:

sudo openssl genrsa -out /opt/apache2/conf/server.key 2048

create certificate

sudo openssl req -new -key /opt/apache2/conf/server.key -out /opt/apache2/conf/cert.csr

Temporary self-signed certificate

sudo openssl x509 -in /opt/apache2/conf/cert.csr -out /opt/apache2/conf/server.crt -req -signkey /opt/apache2/conf/server.key -days 365


Your phab host needs to have a cert that chains up to the one used by the smtp server. You can self-sign, but you need to install it on both hosts, and have the server use it.
If you don’t manage the SMTP service, they should have an FAQ/support section with information about their SSL certificates.


Once i’ve generated these certs, do i need to also insert it in the /conf/certs folder?


So, i created the certificates, and i noticed the following error when running the phabricator logs.

Is this cause by me not creating the certificate properly ?

Daemon 6035 STDE [Tue, 17 Apr 2018 14:28:02 -0400] [2018-04-17 14:28:02] ERROR 2: stream_socket_enable_crypto(): Peer certificate CN=*' did not match expected CN=’ at [/opt/apps/phabricator/htdocs/externals/phpmailer/class.smtp.php:197]

Not sure what is this.

Daemon 6033 STDE [Tue, 17 Apr 2018 14:28:33 -0400] [2018-04-17 14:28:33] EXCEPTION: (PhutilProxyException) Error while executing Task ID 9834. {>} (phpmailerException) Language string failed to load: tls at [/externals/phpmailer/class.phpmailer.php:788]

I guess it tried 3 times, and still fail.

Daemon 6033 FAIL [Tue, 17 Apr 2018 14:28:33 -0400] Process exited with error 255.


I don’t know exactly how you install certs; look up documentation for you OS.
The first error says that the cert returned for wrong hostname -, but you access it as


avivey, as you said. I am accessing it as
My ip address need to have a dns that is rather than ip address.
At the end, i was able to solve it by using a vanilla mail.