How do I change default email settings?

Hello,
I have mattermost running on an Ubuntu VM. All is working well except e-mail. My VM has smart host relaying working using postfix. It has been tested using a bash script. My question is how do I make changes to mattermost email settings so that it will forward emails to my smarthost? I have read about modifying a json file but that files is buried in some crazy directory and there are multiple copies. Is there a single location where I can go and setup smart host relaying for my docker mattermost instance?
Thanks,
Larry

If you’re using docker then modify the configuration file at /go/src/github.com/mattermost/platform/config/config_docker.json inside the docker container

the fields you should configure are

“EmailSettings”: {
“SMTPUsername”: “”,
“SMTPPassword”: “”,
“SMTPServer”: “”,
“UseTLS”: false,
“FeedbackEmail”: “”,
“FeedbackName”: “”

I was able to get into the docker instance and change settings but still no e-mail. A few questions:

  • Does this config file support smtp server port number?
  • I turned on smart host relaying inside the docker instance in postfix and ran a test with a bash script and the email worked. However, still no e-mail from mattermost. Can I use smarthost relaying?
  • I saw an entry in my config file titled: “ByPassEmail” : false,
    What does this mean and do I need to be concerned about it?

My ideal solution would be to just use smart host relaying instead of having to hardcode an smtp user/pass into the config file.

Thanks,
Larry

Hi lmorroni,

  • The config file does support the inclusion of a port number for the SMTP server, so you should include that when you can.
  • Personally I’m not too familiar with smart host relaying but I can’t imagine it causing any issues, if it’s just pointing the application to a different SMTP server that will act as the smart host. If there is anything explicit we need to do for smart host relaying, then it is likely not done, and it is something we can add to our upcoming feature list.
  • The field “ByPassEmail” will allow users to sign up without email if it is set to true. If it’s set to false, users must verify their email when they sign up.

After editing the config file with your SMTP settings, did you restart the server? You can do so with these steps in side the docker container:

  1. cd /go/src/github.com/mattermost/platform
  2. make stop
  3. make run

Any time the config file is edited, the server will need to be restarted.