Advice on email server for NC needed

I have installed NextCloud on a SBC (debian+LLMP) and been using it for three months. I am thinking about adding email capability to this server for NC.

I have no experience on email server and I believe I don’t need a “full scale” email server for NC. So, would like to have your advice on a light weight email server that can be conf easily with NC.

Thanks a lot

No reply ?!?! Is this topic is too simple? too complicate? too risky? or it is classified as paid service area?

My very limited experience on email is with Joomla when it was version 2.5.0. It uses php and I did nothing serious to make the “forget password -> reset” feature work. My impression is email server is complicated but certain execution can be (made) simple (by application developer).

Back to NextCloud, over the world, is it that few people using it with email features?

It’s none of the Nextcloud features to provide a mail server. However, if you persue the idea of running your own mail server, I personally think that is a great idea to get away from these centralized mail services. However, setting up a mail server is a bit more difficult than a web server because you need to respect a few things (don’t be an open relay, reverse dns lookup, …). And just for the notification mails of Nextcloud, it would be too much work.

For a start (you can always use your own mail server later), I’d just use a relay. There is for example ssmtp which is a small mail “server” that can only relay mail via other servers (it can’t receive anything).

1 Like

Thanks tflidd for your reply and especially thanks for the word “ssmtp” which is exactly the type of name that I am looking for.

For NC on SBC or even PC, I also believe no one will set up a full scale mail server merely for it. Just wonder WHATelse others are using in order to enable NC related email features mentioned, say, here.

Good point you are mentioning the documentation. We should add ssmtp, it comes close to the solution of qmail.

I am using ssmtp myself and I forward to my own mail server. The other mechanisms have shown to be a bit difficult with some mail providers (php mail stuff).

Thank you for your help last time. I just upgrade to 14.0.2 and find the php mailer is no longer supported. :weary:
Would you please suggest me another software to use. :stuck_out_tongue_closed_eyes:

Here is the admin doc for email configuration. You’ll notice that the php mailer is still shown (Edit: It is shown in the documentation, which is incorrect, as current Nextcloud doesn’t show it), but that’s an oversight which is being corrected (thanks Marius!), and the other information should be up to date. If you have further questions, we’re happy to help. :slight_smile:

No, “php” is not shown as an option on my screen. May be because my 14.0.2 is last night version. :laughing:

tflidd had advised me to use ssmpt, which suited me perfectly well, before. I push this thread because I want to ask him what will he suggest next.

Great, would you please suggest me any RELATIVELY simple way to replace the “ssmtp” approach. What I want to accomplish at this moment is to enable the “password resets” feature via email only.

  • “relatively” refers to set up a decent private mail server

After wasting some time on the sendmail package, I find this tutorial which use postfix.


easy to follow and utmost important is that it works.

If you need a more detailed guide for the future I have one for you here.

1 Like

Thank you very much. I have bookmarked the page and will try it later. :bowing_man:

I found this 4-part guide on Ars quite informative and easy to understand:

I just passed to the testing phase of NC 14, and I have seen these issues as well. The sendmail option should work and there is a small fix for this:


I hope they manage to put this code in the next point release.

I’d advise against installing a fully working SMTP server unless you really want to have such a thing. Don’t get me wrong, please host your mails as well, decentralize the web, but don’t install it just to forward messages from Nextcloud to your gmail account.

Thank you for your update.
I have install postfix. With the tutorial mentioned above and experience with ssmtp, “password reset” & “notification” works fine, so far.

BTW, not sure about that small fix.
I just checked my “lib/private/Mail/Mailer.php” and the line is still

return new \Swift_SendmailTransport($binaryPath . ’ -bs’);
instead of
return new \Swift_SendmailTransport($binaryPath . ’ -t’);

----edit
Just read from another email post that someone else find it as a fix. Compare to his set up, he uses apache, I use lighttpd. Just for your reference.

Yes there is a pull request, but it hasn’t been merged into the code yet. So it will be earliest in the next point release.

The webserver doesn’t matter that much, more like you configured php.