# Self Host Dependencies

**URL:** https://forum.mattermost.com/t/self-host-dependencies/16321
**Category:** Troubleshooting
**Created:** [July 3, 2023, 6:04am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321 "2023-07-03T06:04:16Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)
#### Post date: [July 3, 2023, 6:04am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/1 "2023-07-03T06:04:16Z")

</div>

I am trying to setup Mattermost on a private server (i.e. self host).

I am coming to two conclusions.

1. Mattermost requires that the server has email functionality in order to send invites et cetera
2. Most email mechanisms will require that you own a domain name and should be able to manipulate the domain records (i.e. A record or MX record). I think that that using a gmail SMTP server relay doesn’t require it , but if you receive emails from a private server , you would have to select “Any IP address” as allowed sender, and that comes with it’s own concerns.

Any help in confirming or correcting my understanding would be appreciated.

---

<div class="post-metadata">

### Author: ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)
#### Post date: [July 3, 2023, 6:18am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/2 "2023-07-03T06:18:10Z")

</div>

Hi Rochus,

ad 1) this is correct, but the server does not need to have this functionality, you can also configure an external SMTP host and send all mail there, no need to run a local MTA on the Mattermost box.

ad 2) Mattermost also supports SMTP authentication for sending mails, so you do not need to open up ports or reduce security anywhere in your mailing setup, just specify a gmail username/password in the SMTP configuration and you should be able to send mails via gmail then.

---

<div class="post-metadata">

### Author: ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)
#### Post date: [July 3, 2023, 6:27am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/3 "2023-07-03T06:27:31Z")

</div>

Hi Alexander,

thanks for the quick reply.

Regarding 2) upon having read [this](https://docs.mattermost.com/configure/smtp-email.html) I understood that I have to configure SMTP email relay in order to use gmail, and from reading google workspace page I get the understanding that I would need to choose to allow sender emails from any address. Is this understanding incorrect ?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/4/46c7a39c1f22a640847c544c8d50241adb21c021.jpeg)

---

<div class="post-metadata">

### Author: ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)
#### Post date: [July 3, 2023, 6:40am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/4 "2023-07-03T06:40:27Z")

</div>

It depends. You can configure the from address Mattermost uses for sending notification mails, if this is set to the gmail address you’re using for authenticating against google, it will work because this address is already allowed.  
If you authenticate with `something@gmail.com` to Google’s servers and want to use `mattermost@mydomain.tld` as the sender adresse, it will not work and you would need to allow any sender adresse in Google, but since you do not seem to want to have a separate domain for Mattermost anyways, this should not be a problem for you.

---

<div class="post-metadata">

### Author: ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)
#### Post date: [July 3, 2023, 11:51pm UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/5 "2023-07-03T23:51:38Z")

</div>

okay. I will give it a go. I had intended to use an email account from our google workspace as the notification email. I will let you know what I learn. Thanks

---

<div class="post-metadata">

### Author: ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)
#### Post date: [July 4, 2023, 1:25am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/6 "2023-07-04T01:25:59Z")

</div>

Thanks Alexander. You are correct. There was a bit of a kerfuffle caused by the requirement for the enabling of 2FA and an app specific password, but nonetheless I saw that “test connection” in the app sent an email to my different gmail account.

---

<div class="post-metadata">

### Author: ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)
#### Post date: [July 4, 2023, 3:30am UTC](https://forum.mattermost.com/t/self-host-dependencies/16321/7 "2023-07-04T03:30:53Z")

</div>

Awesome, great to hear that 🙂 Thanks for reporting back.
