Currently i have 3 domains on a vps from digital ocean (running 14.04). Ive installed a lamp stack by following tutorials. Now I looked for an own mail server but most forums said it wasn't easy and is alot of work to maintain and advice to pay for one https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server . how hard is it to install and to maintain compared to a lamp stack. I have basic knolwedge of ubuntu. Is it adviced to just buy one ?
It's easy to host a mail server in Ubuntu... But it's really hard to do it well.
It's almost impossible for a novice to do it as well as a professional company can.
You can boil the arguments down to:
Uptime. Professional mail hosts can have multiple MX machines reading your email into a load-balaced cluster database. They'll be up 99.999999999% of the time. If your one server goes down, people sending email to you will see bounces. It won't look very good and you'll lose incoming email.
Spam. It takes billions of incoming emails to accurately detect which messages are really spam. That's why players like Gmail are so good at it. Tools like Spam Assassin rely on numbers and accurate training (which Gmail et al generate through crowd-sourcing all their users' input).
Security. Mail delivery, processing and access —including webmail— has so many attack vectors. It isn't like a webserver that you can do request analysis and frame limits on. Many processes interact with this foreign, possibly unsafe data and there are so many emerging attacks on every part of that stack. You have to stay on top of it all the time.
Blacklists and whitelists. The abundance of spammers has made many spam filtering systems work at least partially on lists of known spammers. If your provider gets a bad reputation for allowing spam, your IP could be caught up in a blacklist of their entire IP range. This will result in your outgoing emails simply being dropped.
There are many "certified" whitelist programmes around too where companies can pay to be included. These are typically expensive to join but this is what you need if you plan on sending a lot of email.
Hosted email is cheap (it can even be free) and there are some great options out there. If this is worth nothing to you, feel free to host it yourself, but honestly, a smart person lets somebody else deal with the headache.
That is not to say that either basic server or LAMP security are walks in the park. Ubuntu will handle the basic security —as long as you keep up to date with package updates— but you have to manage unpackaged things like Wordpress and Drupal installs, as well as making sane decisions to firewall away non-essential services, and not making any configuration faux pas.
Even things like basic SSH hardening (disclosure: mine) can take a while.