How To Run Your Own Email Server With Your Own Domain Parts I, II, III


Recommended Posts

By Lee Hutchinson - Feb 17 2014, 1:00pm AUSEST
Part I: How to run your own e-mail server with your own domain
Gmail? Apple? The cloud? Forget 'em all?in this series, we take your e-mail back.
E-mail is old and complex. It's the oldest still-recognizable component of the Internet, with its modern incarnation having coalesced out of several different decades-old messaging technologies including ARPANET node-to-node messaging in the early 1970s. And though it remains a cornerstone of the Internet?the original killer app, really?it's also extraordinarily hard to do right.

We most often interact with e-mail servers through friendly Web-based front-ends or applications, but a tremendous amount of work goes into hiding the complexity that allows the whole system to work. E-mail functions in a poisoned and hostile environment, flooded by viruses and spam. The seemingly simple exchange of text-based messages operates under complex rules with complex tools, all necessary to keep the poison out and the system functioning and useful in spite of the abuse it's constantly under.

From a normal person's perspective, e-mail seems like a solved problem: sign up for Internet access and your ISP gives you an e-mail address. Google, Apple, Yahoo, or any number of other free e-mail providers will hook you up with e-mail accounts with gigabytes of space and plenty of cool value-added features. Why do battle with arcane dragons to roll your own e-mail solution?

I'll tell you why: because if it's in the cloud, it's not yours.
2rnhuog.png
Part I: How to run your own e-mail server with your own domain

Part I Page 1

Part I Page 2
.....................................................................................................................................................................................................
By Lee Hutchinson - Mar 7 2014, 1:00pm AUSEST
Part II: Taking e-mail back: Arming your server with Postfix and Dovecot
Our self-hosting e-mail series continues as we get our ducks?and doves?in a row.
Here in part 2, we've got three primary tasks:
?Acquire and install an SSL/TLS certificate for our mail server
?Perform some basic Postfix configuration so that it can function as an MTA and work with Dovecot
?Perform some basic Dovecot configuration, including setting up three virtual users and their mail directories

Let's get started.

One last thing...

Before we do anything else, it's time to update stuff. It's been more than a week since part 1 was published, and it's possible that critical updates have been issued since then.
xe38u8.png

Part II: Taking e-mail back: Arming your server with Postfix and Dovecot
Part II Page 1
Part II Page 2
Part II Page 3
Part II Page 4
..............................................................................................................................................................................................
By Lee Hutchinson - Mar 22 2014, 11:30pm AUSEST
Part III: Taking e-mail back: Fortifying your box against spammers 
We load up OpenDKIM, SpamAssassin, ClamAV, and get Sieve filtering operational.
96lrps.jpg
It's time for part 3 of getting your e-mail server up and running! We have six main tasks with this segment, each of which has its own chunk of subtasks. We'll go through them in roughly this order:
?Install OpenDKIM so that we can use DomainKeys Identified Mail to help recipient domains validate that the e-mail we send actually comes from us
?Install SpamAssassin for spam filtering
?Install ClamAV for virus scanning (though this is somewhat optional, as we'll discuss when we get there)
?Configure SpamAssassin and ClamAV and talk a bit about spam filtering
?Configure our external DNS and talk a bit about how to handle internal DNS as well (as part of this, we'll set up DKIM and SPF records and also talk about reverse-lookups)
?Set up some server-side mail filters with Sieve to toss spam and do some other neat tricks
Part III: Taking e-mail back: Fortifying your box against spammers  
Part III Page 1
Part III Page 2
Part III Page 3
Part III Page 4

........................................................................................................................................................................................

Full Source Part I

Full Source Part II

Full Source Part III

  • Like 2
Link to comment
Share on other sites

Looks good so far. Although I have been administering my own EMail server for the better part of a decade I'll read it and see how it is.

 

Hopefully, many users play around with it. Even if they aren't interested in it for the privacy reasons it will be a good way to learn how email works on a very technical level.

Link to comment
Share on other sites

  • 4 weeks later...

By Lee Hutchinson - Apr 19 2014, 11:00pm AUSEST
Part IV: The finale, with webmail & everything after
Setting up and securing Roundcube and going forward into a self-hosted future.

2enyjyo.jpg
You all have persevered through quite a bit to get to this point: we have a functional and secure e-mail server that does a good job at ignoring or dumping off spam before it hits your inbox. We've got all the right pieces in place to ensure that the mail we send gets delivered; we've got OpenDKIM operational, and we've got DNS properly configured (including reverse lookups!).
Part IV: The finale, with webmail & everything after
Part IV Page 1
Part IV Page 2
Part IV Page 3
Part IV Page 4
Part IV Page 5

Lee Hutchinson / Lee is the Senior Reviews Editor at Ars and is responsible for the product news and reviews section. He also knows stuff about enterprise storage, security, and manned space flight. Lee is based in Houston, TX.

 

P.s: Hope Mods move this up to OP between Part III Page 4 and Full Source Part I, also by adding Full Source Part IV at the end of the post, and,  and IV into the title in the same OP order and delete this #3 post. Thanks.

Link to comment
Share on other sites

I thought you were gonna write your own guide instead of copying and pasting.

Looks good so far. Although I have been administering my own EMail server for the better part of a decade I'll read it and see how it is.

Hopefully, many users play around with it. Even if they aren't interested in it for the privacy reasons it will be a good way to learn how email works on a very technical level.

It must be a awesome learning experience :) And the ultimate control you have over your email is priceless...
Link to comment
Share on other sites

This topic is now closed to further replies.