Best operating system for email/web server

Hello I was just wondering if someone could help me figure out what the best operating system would be for a server that will handle internal and external email in addition to hosting an internal web server. If someone could help me out that would be great. Thanks!

Best? I don’t know but it is easiest to use Linux inside containers no matter what operating system you use as base.

Linux or BSD will work fine as a web server. Docker runs fine with both to run one or the other.

Depending on use case you may not want to host your own email server.

1 Like

Whatever OS you choose make sure you use one that’s LTS. Your mail server will break all the time if you’re updating frequently and it can be a real headache to fix.

This is a guide I used to set up my mail server, it’s for ubuntu or debian but it would be similar enough on another version of linux.

http://flurdy.com/docs/postfix/

1 Like

I have a guide here for the email part. I use Debian.

For the internally facing web server part just install Apache on the same server.

If you want to access the email externally from a web page (rather than client software) you can use this guide which also provides a ton more functionality.

You could do this with MS Windows compatible products of course but the resource usage would be higher and you would have to pay for licensing on at least the OS.

I would run a Ubuntu 16.04 LAMP server.

Stands a for Linux, Apache, MySQL (or MariaDB) and Postfix

The last one (Postfix) is the one that lets you send email.

You could pick a LAMP or LEMP (nginx instead of Apache) Droplet image on Digital Ocean. And host you websites from it. For the mail server you could follow the next guide on how to set up mail in a box.

Although I recommend using an external SMTP service like Mailgun, in order to avoid blacklisting problems.

The easiest and cheapest way is to sign up for a shared hosting, on any of the major hosting providers and host your website and store and send email.

As above, personally I’d do it with Linux, and I’d also suggest an LTS variant - bleeding edge is fine if you’re talking about a desktop, but when your email breaks because soemone rolled a less-than-stable patch out, or a major policy change breaks your server, it kinda sucks. This is what LTS is for.

I’d also suggest the OS variant you are most comfortable with.

All platforms are insecure to varying degrees, so pick one you can comfortably maintain, in order to ensure you do actually patch it promptly. Going with LTS will help here by reducing the complexity and severity of changes. Keep an eye on the CERT and full-disclosure mailing lists (subscribe to them).

I’d also recommend a third party relay service for inbound mail filtering. Trying to maintain your own blacklists, etc. is a never-ending battle that you’ll continually lose at. The problem is just too big for a single admin to handle with his/her own rules, etc.

Just want to add that 18.04 LTS is out should be out today.
So, that would be the even longer term. :wink:

1 Like

My understanding is Linux is best for speed, while BSD is ideal for security.

FreeBSD hands down in my opinion.

It make take a bit to learn. The forums are super friendly if you put in effort (more so than any Linux experience I’ve had)

I’m a FreeBSD fan as well (i have 2 internet facing servers on it, and been running various FreeBSD boxes since 2001, use FreeNAS, pfsense, etc.), but lately it has been left behind in some respects.

Most of the developer resources look to be focused on Linux, the application support comes to Linux first and virtualisation (both as a guest and as a host) is more mature.

Also, its far more popular in corporate land - so if you’re looking to run something that will teach you useful skills for employment, given the choice between FreeBSD or Linux, Linus may be a better bet.

From an ideological perspective though, FreeBSD for sure.

TLDR: I’d like to run FreeBSD instead of Linux everywhere but i really can’t be bothered dealing with the hassles any more. Linux is good enough and just way less rooting around now.