Mattermost SMTP settings are wrong after first run

By the Way the email settings (SMTP) were not correctly configured. There is probably room for improvement there.

1 Like

Isn’t it set to localhost which should work?


Nope. It didn’t work ootb. I don’t remember what setting was configured however. Indeed, localhost/25 works without authentication.

You’re right, I think you found a bug so I moved it to a new topic.
It seems Mattermost defaults to localhost:10025 now in the config file but Neth only fills empty config entries so the wrong value is kept and the correct localhost:25 is never set.

I think we could move the SMTPServer and SMTPPort settings to the first run above without the if_not_empty check. This way it would be set after installation and could be changed if needed and won’t affect already installed instances.


Sorry for the delayed response.
Thanks for reporting, this is indeed a regression.

What should be a good default? If the mail server is installed, we could use port 10587, but what about if mail server is not installed?

What do you think @davidep?

1 Like

If the system does not provide a local SMTP server we could fall back on the default smart host settings. If they do not exist and if mattermost allows it, use the sendmail command.

It neither a default smart host nor the sendmail command are applicable, configure a SMTP server from the UI.

1 Like

So what are the default settings?
Mattermost has a wrong default for our configuration.

It doesn’t support sendmail so we should do with SMTP configuration. I disagree to expose SMTP configuration: we automatically configure all applications which need such options, why Mattermost should be an exception?
SMTP configuration for Mattermost should be automatic.

If /etc/e-smith/db/configuration/defaults/postfix/access exists, it means that nethserver-mail-common is installed and we can use localhost:10587.
What about if nethserver-mail-common is not installed? What is the right default? Is it better to use localhost:587 or localhost:25?

1 Like

Effectively localhost:25 seems to be listening and accepting messages. Go with it, no authentication and no special config for smart host is needed.

I was wrongly thinking that port 25 was closed without mail-common. Instead mail-smarthost is always installed and provides enough basic config.

You could always try to use port 25: relay is always allowed from… :thinking:


Issue open:


Fix released!