Unable to configure SMTP

Installed Phabricator in a Oracle Linux 7.6 (running inside VirtualBox). Having trouble configuring outbound mail.

Steps I did:-

  • Named a domain for the VM server (updated /etc/hostname, /etc/hosts)
  • Install epel and remi repository
  • Install Apache, MySql server
  • Install PHP 7.3 from remi repo.
  • Firewalls opened for port 80 and 443
  • Included rewrite_module in httpd.conf file.
  • Created virtual host file Phabricator
  • Cloned Phabricator, Configured MySql host/user/password/base-url
  • Upgrade Phabricator schema.
  • Created first user account.
    Everything works file, I’m able to login, create Diffusion.

I tried to configure e-mail and my installation do not have hundreds of configuration. Not sure what is wrong in my setup. I was specifically interested in outbound e-mail configuration and found configurations like metamta.mail-adapter, metamta.domain, phpmailer.smtp-host, phpmailer.smtp-password, phpmailer.smtp-port, phpmailer.smtp-protocol, phpmailer.smtp-user are something important that I am missing.

Attached is the complete list of configuration I am able to see in my environment. Couldn’t identify what I am missing and how to configure outbound correctly? Please advise.

Why do you believe these options exist?

Upon user creation in Phabricator, mails are queued. My cluster.mailers configuration is below.
[
{
“key”: “phabri-smtp”,
“type”: “smtp”,
“options”: {
“host”: “corp-smtp-server.org”,
“port”: 25,
“user”: "myuserid@corp-name.com",
“password”: “my-password”,
“protocol” : “tls”
}
}
]

./bin/mail show-outbound --id 7 shows -
ID: 7
Status: queued
Related PHID:
Message: Language string failed to load: tls

I am able to telnet corp-smtp-server.org 25 from the Phabricator host.

Then I start looking for solutions and most of the references I saw has configuring metamta.mail-adapter, metamta.domain (ex: https://phabricator.karenware.com/book/phabricator/article/configuring_outbound_email/). However my instance do not have those properties and thought I am doing something wrong.

Any pointers to resolve this issue would be of great help for me. Thanks.

phabricator.karenware.com is a third-party install owned by an arbitrary user running an old version of the software, serving an old version of the documentation.

You can find modern documentation on secure.phabricator.com:

https://secure.phabricator.com/book/phabricator/article/configuring_outbound_email/

The metamta.domain option (and many other similar options) were removed in 2019 Week 1. See the changelog for more details:

https://secure.phabricator.com/w/changelog/2019.01/

This error:

Language string failed to load: tls

…arises from PHPMailer, which is often fairly opaque (see also: https://secure.phabricator.com/T12404). I suspect it indicates that TLS is failing to start.

It is somewhat unusual for SMTP + TLS to be hosted on port 25. The server might not actually support TLS. Removing the "protocol" key from your configuration (or, possibly, changing it from "tls" to "ssl") may resolve this, or possibly changing the port from 25 to 587.

If this does not resolve the issue, PHPMailer may be unable to start a TLS connection with your mailserver for some reason. Your mailserver might have more details in its logs. We can’t do much to help with this directly since we have no way to reproduce the issue.

Thanks for helping out. I removed all optional fields from the mailer json and Phabircator took rest. It worked.
[
{
“key”: “phabri-smtp”,
“type”: “smtp”,
“options”: {
“host”: “corp-smtp-server.org
}
}
]