Setting up Outbound email


#21

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


#22

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.


#23

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


#24

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

Log1
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=*.myphabricator.com' did not match expected CN=10.10.5.1’ at [/opt/apps/phabricator/htdocs/externals/phpmailer/class.smtp.php:197]

Log2
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]

Log3
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.


#25

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 - myphabricator.com, but you access it as 10.10.15.1.


#26

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