Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5b8a0c5
Updated SteamCMD and CSGO guides
nmelehan Feb 7, 2019
51bf15b
Removed modified dates
nmelehan Feb 7, 2019
5d889ea
Updated publish date for CSGO Ubuntu 18.04
nmelehan Feb 8, 2019
2cd63af
Initial Commit
andystevensname Mar 12, 2019
ad20d72
Remove redundant step about setting password
ErikSwan Mar 17, 2019
3ecee99
[New] A Beginner's Guide to Kubernetes
andystevensname Mar 21, 2019
efa4114
Vale fixes
andystevensname Mar 21, 2019
16cedc3
More Vale Fixes
andystevensname Mar 21, 2019
34732cf
[Update] Use mysqldump to back up mysql or mariadb
andystevensname Mar 21, 2019
0e26a6b
Updates
andystevensname Mar 22, 2019
a6c7d32
[Update] How to Install a LEMP Server on Ubuntu 18.04
andystevensname Mar 22, 2019
e7d6e9d
updated for 18.04 as well as formatting changes
fm Mar 24, 2019
26ae8a9
trimming trailing spaces
fm Mar 24, 2019
0b6e7ab
Changed Linode images introductory paragraph to better reflect some l…
spishspish Mar 26, 2019
df2d49b
Copy edit
Mar 27, 2019
f89f070
Copy edit
Mar 27, 2019
47dac6b
typo https protocol
dawncold Apr 16, 2019
618d38c
More grammar fixes
andystevensname Apr 17, 2019
118ec2e
Added note for additional /etc/fstab flags
evinjenioso Apr 17, 2019
61c4388
fixed indent
evinjenioso Apr 17, 2019
8bd604a
removed trailing whitespace
evinjenioso Apr 17, 2019
950ff4b
Add IPv6 transfer quota info
leslitagordita Apr 22, 2019
010dac9
[Update] How to Upgrade to Ubuntu 18.04 LTS
andystevensname Apr 24, 2019
876d24e
[Update] Getting Started with the Linode API
andystevensname Apr 25, 2019
99bcbd8
Update NixOS guide for 19.03
nixy Apr 25, 2019
eaabb97
Added IP Swap Note
Apr 25, 2019
e0ecea5
Added raw disk caveat
Apr 26, 2019
5ca0081
Merge branch 'mail-in-a-box-2' of https://github.com/ajrt2118/docs in…
Apr 30, 2019
9fad986
Added e2fsck -f step
Apr 30, 2019
41697ca
mailinabox ubuntu18
May 1, 2019
bc4c02b
New find files image
May 1, 2019
e2035c5
Merge pull request #2474 from rsyracuse/find-image-update
Guaris May 1, 2019
2f7d6bb
Merge pull request #2466 from rsyracuse/raw-disk-images
Guaris May 1, 2019
a5b72b1
Merge pull request #2464 from nixy/update/nixos
Guaris May 1, 2019
72b873b
Merge pull request #2386 from ErikSwan/patch-1
Guaris May 1, 2019
fcc1193
whitespace
May 1, 2019
00ac878
Merge pull request #2468 from rsyracuse/e2fsck-resize
Guaris May 1, 2019
19681bb
Whitespace
May 1, 2019
503636f
whitespace
May 1, 2019
580443a
whitespace
May 1, 2019
24d2ce2
update images and directions for new advanced menu item
ajdeleon May 3, 2019
41abf88
whitespace
May 3, 2019
3f015e5
whitespace
May 3, 2019
1d4a05a
whitespace
May 3, 2019
ae53734
xlsxwriter typo fix
May 6, 2019
578e5ce
Merge pull request #2462 from andystevensname/update-getting-started-…
leslitagordita May 9, 2019
22362d6
Merge pull request #2401 from andystevensname/update-how-to-install-l…
leslitagordita May 9, 2019
f37465c
fixed conf.d error
May 10, 2019
5b8108d
better wording
May 10, 2019
30dd8c4
better wording
May 10, 2019
8fddded
Merge pull request #2480 from rsyracuse/beautiful-soup-xlswrite-typo
Guaris May 11, 2019
ac06204
Merge pull request #2465 from rsyracuse/clone-ipswap-add
Guaris May 11, 2019
97913ea
Merge pull request #2459 from andystevensname/update-upgrade-to-ubunt…
Guaris May 11, 2019
75f28be
Merge pull request #2456 from leslitagordita/transfer-ipv6-update
Guaris May 11, 2019
cbf2b45
Merge pull request #2472 from rsyracuse/mail-in-a-box-update
Guaris May 11, 2019
a8a0164
Merge pull request #2454 from evinjenioso/fstab
Guaris May 11, 2019
03027f5
Merge pull request #2450 from dawncold/patch-1
Guaris May 11, 2019
0ed429b
Merge pull request #2477 from ajdeleon/update-disk-images-and-config-…
Guaris May 11, 2019
98f707b
Merge pull request #2405 from e-boz/develop
Guaris May 11, 2019
301a0fd
Merge pull request #2398 from andystevensname/update-mysqldump-to-bac…
Guaris May 11, 2019
aa72a0c
Merge pull request #2397 from andystevensname/beginners-guide-to-kube…
Guaris May 11, 2019
0b031b4
Merge pull request #2313 from nmelehan/csgo-tech-edit
Guaris May 11, 2019
109075b
Merge pull request #2483 from rsyracuse/ubuntu18.04-conf.d-edit
Guaris May 11, 2019
b271ded
[Update] Introduction to Version Control (#2487)
hzoppetti May 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ci/vale/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ config
configs
configtest
configurability
containerd
containerised
convolutional
cookstyle
Expand All @@ -198,6 +199,7 @@ craigslist
crashingdaily
createdt
createfromstackscript
cri
cron
crond
cronie
Expand Down Expand Up @@ -398,6 +400,7 @@ foodcritic
fortran
fpm
fragging
frakti
framesets
freedns
friendster
Expand Down Expand Up @@ -1088,6 +1091,7 @@ releasever
remi
remmina
remotehost
replicaset
replset
repo
repos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ row = 0
The **Headlines** variable is a list of titles for the columns in the spreadsheet. The **row** variable tracks the current spreadsheet
row.

2. Use `xlswriter` to open a workbook and add a worksheet to receive the data.
2. Use `xlsxwriter` to open a workbook and add a worksheet to receive the data.

{{< file "craigslist.py" python >}}
workbook = xlsxwriter.Workbook('motorcycle.xlsx')
Expand Down
489 changes: 489 additions & 0 deletions docs/applications/containers/beginners-guide-to-kubernetes/index.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ password = MySQL root user's password
3. Create the cron job file. Below is an example cron job to back up the entire database management system every day at 1am:

{{< file "/etc/cron.daily/mysqldump" >}}
0 1 * * * /usr/bin/mysqldump --defaults-extra-file=/home/example_user/.my.cnf -u root --single-transaction --quick --lock-tables=false --all-databases > full-backup-$(date +%F).sql
0 1 * * * /usr/bin/mysqldump --defaults-extra-file=/home/example_user/.my.cnf -u root --single-transaction --quick --lock-tables=false --all-databases > full-backup-$(date +\%F).sql
{{< /file >}}

For more information on cron, see the [cron(8)](https://linux.die.net/man/8/cron) and [cron(5)](https://linux.die.net/man/5/crontab) manual pages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Version control (also referred to as *revision control* or *source control*) is

Version control is also a great tool for individuals who need to work on the same files at the same time. With version control, they can *check out* the repository and then *commit* the changes when they're finished. If two individuals have modified the same file, the version control system can usually *merge* the changes, unless there's a *conflict*, in which case the user will need to manually combine the changes or favor one change over the other.

Version control also makes it easy to track changes. You can see who committed code, and why. And if you start working on a new version of your website or application, you can *branch* a copy of your code to a separate area. (The branch can later be modified back into the *truck*.) In short, version control is cheap insurance against human errors and unforeseeable disasters. You should be using it!
Version control also makes it easy to track changes. You can see who committed code, and why. And if you start working on a new version of your website or application, you can *branch* a copy of your code to a separate area. (The branch can later be modified back into the *trunk*.) In short, version control is cheap insurance against human errors and unforeseeable disasters. You should be using it!

### Evaluating Version Control Systems

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,34 @@ description: 'This guide shows how to install and run Mail-in-a-Box, a simple, c
keywords: ["install mail-in-a-box", "webmail control panel", "caldav", "cardav", " TLS certificate"]
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
published: 2017-08-29
modified: 2017-08-30
modified: 2019-03-19
modified_by:
name: Alexandru Andrei
name: Faisal Misle
title: How to Create an Email Server with Mail-in-a-Box
contributor:
name: Alexandru Andrei
external_resources:
- '[Mail-in-a-Box Official Website](https://mailinabox.email/)'
- '[Mail-in-a-Box Forums](https://discourse.mailinabox.email/)'
---


![How to Create an Email Server with Mail-in-a-Box](Mail_in_a_box.jpg "How to Create an Email Server with Mail-in-a-Box")

If you chose to host your own email server, but after reading through [Running a Mail Server](/docs/email/running-a-mail-server/) you got discouraged by the complexity of this process, then there's another solution: Mail-in-a-Box. The name is fitting since the software manages to pack everything you need from a mail server, in one single allegorical box. It includes:

* Postfix, as the Simple Mail Transfer Protocol (SMTP) server.
* Dovecot, as the Internet Message Access Protocol (IMAP) server; it's what allows you to sync mail with your phone, read/send messages, delete them, etc.
* Postfix, as the *Simple Mail Transfer Protocol* (SMTP) server.
* Dovecot, as the *Internet Message Access Protocol* (IMAP) server; it's what allows you to sync mail with your phone, read/send messages, delete them, etc.
* CardDAV/CalDAV implemented through Nextcloud (a fork of OwnCloud that includes more features); this enables you to sync your address book and calendar events.
* Z-push to implement the Exchange ActiveSync protocol so that mail can be "pushed" to your phone as soon as it arrives on the server.
* Roundcube webmail, which helps you manage your email by using a web browser.
* Nsd4 Domain Name System (DNS) server; this saves you the hassle of manually adding DNS entries to configure *Sender Policy Framework* (*SPF*), *DomainKeys Identified Mail* (*DKIM*) and *Domain-based Message Authentication, Reporting and Conformance* (*DMARC*), features used to battle spam on the Internet; properly configured, these increase the likelihood that your server will be seen as "legit" by other servers
* Nsd4 *Domain Name System* (DNS) server; this saves you the hassle of manually adding DNS entries to configure *Sender Policy Framework* (SPF), *DomainKeys Identified Mail* (DKIM) and *Domain-based Message Authentication, Reporting and Conformance* (DMARC), features used to battle spam on the Internet; properly configured, these increase the likelihood that your server will be seen as "legit" by other servers
* A backup service
* A control panel, also accessible through the web browser, that:
* Greets you with a comprehensive system status check that makes you aware of any possible problems with your server and offers advice on how to fix them;
* Lets you add or remove mailboxes, change passwords, backup data, change DNS settings;
* Does a great job at explaining what each setting does and how it should be used. It also includes examples on how to interact with its *Application Programming Interface* (API) so that you can automate tasks, such as creating a mailbox through your own application/website (e.g., user registers on your website to get an email account)
* And more: if you're interested in the details, you can read about the components here: [Mail-in-a-Box Components](https://github.com/mail-in-a-box/mailinabox#the-box)
* If you're interested in the details, you can read about the components here: [Mail-in-a-Box Components](https://github.com/mail-in-a-box/mailinabox#the-box)

The preconfigured box of software is also fairly security-conscious and you can read more about it here: [Security features enabled in Mail-in-a-Box](https://github.com/mail-in-a-box/mailinabox/blob/master/security.md)

Expand All @@ -44,23 +45,25 @@ The preconfigured box of software is also fairly security-conscious and you can

3. It's highly recommended that you follow the instructions on [Hardening SSH access](/docs/security/securing-your-server/#harden-ssh-access) but **only** the steps regarding SSH; other steps might clash with what Mail-in-a-Box will set up (e.g., it implements its own `fail2ban` rules).

If you insist on using a password for root instead of a private key, at least use a **very good password**. Bots constantly scan the Internet for SSH servers and try random passwords. Some are more aggressive than others, and while `fail2ban` helps block IPs, there's always the next bot (with a different IP) that will visit and have another try. Keep in mind that strings such as "h4x0r123," while they may look strong because they mix letters and numbers, are actually very weak.
If you insist on using a password for root instead of a private key, at least use a **very good password**. Bots constantly scan the Internet for SSH servers and try random passwords. Some are more aggressive than others, and while `fail2ban` helps block IPs, there's always the next bot (with a different IP) that will visit and have another try. Keep in mind that strings such as *h4x0r123*, while they may look strong because they mix letters and numbers, are actually very weak.

4. Wherever you see `example.com` in this tutorial, replace it with your domain name, and leave the prefix as it is. That is, don't change `box` to something else.
{{< note >}}
Wherever you see `example.com` in this tutorial, replace it with your domain name, and leave the prefix as it is. That is, don't change `box` to something else. Also, `203.0.113.1` is used as an example IP; your outputs should reflect your server IP instead.
{{< /note >}}

## Launch Ubuntu 14.04 Server
## Launch Ubuntu 18.04 Server

{{< caution >}}
Use this server exclusively for Mail-in-a-Box. Installing extra software might cause unexpected behavior.
{{< /caution >}}

Although Ubuntu 16.04 is available, Mail-in-a-Box has not been prepared or tested in that environment so you'll need to use the 14.04 release which still receives security fixes until April 2019.

Choose a server with at least 1GB of RAM. If you plan to host many users (mailboxes) and/or expect a high volume of email traffic, you can start out with 2GB or more. Don't forget to boot the server.

Make sure you select Ubuntu 18.04 as the *Operating System* (OS), as starting with version 0.40 only Ubuntu 18.04 is supported.

## Configure Your Domain Name

You'll have to check with the company where you've registered your domain name to see how you can change your nameservers and add glue records. Either search for this information on Google, the site's knowledge base, or ask their support to help you.
You'll have to check with your registrar, the company where you've registered your domain name with, to see how you can change your nameservers and add glue records. Either search for this information on Google, the site's knowledge base, or ask their support to help you.

Here's what you'll need to do:

Expand All @@ -74,7 +77,7 @@ Here's what you'll need to do:
ns1.box.example.com 203.0.113.1
ns2.box.example.com 203.0.113.1

You might have noticed you're using the same IP in both entries. There are a few registrars that have a problem with this, so in case you're unlucky, you won't be able to save these settings and will have to contact their support team.
You might have noticed you're using the same IP in both entries. There are a few registrars that have a problem with this, so you may not be able to save these settings and will have to contact their support team. Alternatively, you can skip using your box as a DNS host, and keep your registrar's DNS host. You will find all the needed records in the **System -> External DNS** tab of the administration console, once you've completed installation.

Also note that some registrars may only require you to enter `ns1.box` as they autocomplete the rest of your hostname, `.example.com`. Carefully examine the page to see which variant you should use.

Expand All @@ -90,7 +93,7 @@ You should see your nameservers at the end of the output:
example.com. 300 IN NS ns2.box.example.com.
dig: couldn't get address for 'ns1.box.example.com': no more

At this point you can continue. If you don't see the required data, then come back later and check - again. If after one hour it's still missing, then contact your registrar's support team.
At this point you can continue. If you don't see the required data, then come back later and check again. If after one hour it's still missing, then contact your registrar's support team.

## Install Mail-in-a-Box

Expand All @@ -110,31 +113,31 @@ If you notice a reboot is needed (usually when the Linux kernel is upgraded), ty

curl -s https://mailinabox.email/setup.sh | sudo bash

It will start to download software and after a while greet you with a *Text User Interface* (*TUI*), which is a way to present a more user-friendly install wizard under the limitations of a terminal. You can navigate the menus with the arrow keys and simply press `ENTER` to make the desired selections.
It will start to download software and after a while greet you with a *Text User Interface* (TUI), which is a way to present a more user-friendly install wizard under the limitations of a terminal. You can navigate the menus with the arrow keys and simply press `ENTER` to make the desired selections.

Every step is thoroughly explained in the terminal output. The first steps are easy to follow. But here are the more interesting ones:
Every step is thoroughly explained in the terminal output.

### Install Wizard Steps

1. When you're prompted to choose an email address, delete the pre-filled value and replace it with `your_name`@example.com. You can replace `your_name` with whatever you desire, as long as it's a valid username.

![Choose Main Email Address and Domain](mail-in-a-box-choose-email-and-domain-ubuntu1404.png)
![Choose Main Email Address and Domain](mail-in-a-box-choose-email-and-domain-ubuntu1804.png)

2. In the next step, the hostname should look like this:

![Choose Hostname](mail-in-a-box-choose-hostname-ubuntu1404.png)
![Choose Hostname](mail-in-a-box-choose-hostname-ubuntu1804.png)

Now, the install wizard should continue to download and configure software packages. Just wait for it to do its magic.

3. At the next step, you'll be prompted to choose your timezone. Use the arrow keys to make the desired selection and press `ENTER`.

![Choose Timezone](mail-in-a-box-choosing-timezone-ubuntu1404.png)
![Choose Timezone](mail-in-a-box-choose-timezone-ubuntu1804.png)

Once again, Mail-in-a-Box will continue to pull in required packages and auto-configure them. Wait for it to finish, it will take longer this time.

4. When package auto-configuration is complete, you'll be prompted to install a *Transport Layer Security* (*TLS*) certificate. If Let's Encrypt cannot verify that you own your domain (i.e., DNS changes haven't yet propagated to its servers), then this step will be automatically skipped, but you can still request your certificate later from the control panel of Mail-in-a-Box.
4. When it finishes installing the packages, the script will prompt you to choose a password for the administrative account. Choose a good password since this is the most powerful account that can make any change in the control panel. This will also be the password to the email account you set up in Step 1.

5. At the next step, you'll choose a password for the administrative account. Choose a good password since this is the most powerful account that can make any change in the control panel.
5. When package auto-configuration is complete, you'll be prompted to install a *Transport Layer Security* (TLS) certificate. If Let's Encrypt cannot verify that you own your domain (i.e., DNS changes haven't yet propagated to its servers), then this step will be automatically skipped, but you can still request your certificate later from the control panel of Mail-in-a-Box.

6. At this point the script has finished its job and you'll be prompted with this message in the terminal output:

Expand Down Expand Up @@ -173,19 +176,19 @@ Since it's very likely that a Let's Encrypt TLS certificate hasn't been installe

dig example.com

When you see this in the output, `203.0.113.1` (the IP address of your server), you can continue; otherwise try again later:
When you see your server IP in the A record, you can continue; otherwise try again later.

;; ANSWER SECTION:
example.com. 1724 IN A 203.0.113.1

2. In the top-left menu you'll notice an element called **System**. Click on it and then select **TLS (SSL) Certificates**. Now click on the blue button that says **Provision** and follow the instructions.
2. In the top-left menu you'll notice an element called **System**. Click on it and then select **TLS (SSL) Certificates**. Now click on the blue button that says **Provision** and within a few minutes the certificate status should change to **Signed & valid**.

![Control Panel - TLS Certificates Page](mail-in-a-box-control-panel-tls-certificates-ubuntu1404.png)

3. Follow this guide, [How to Configure Reverse DNS on a Linode Server](/docs/networking/dns/configure-your-linode-for-reverse-dns/), to set up a pointer record (PTR). This step is important to execute and pass some antispam checks. Without it, some of the other mail servers will flag your outbound email as spam or will consider it suspicious that your IP doesn't point to your domain name.
3. Follow this guide, [How to Configure Reverse DNS on a Linode Server](/docs/networking/dns/configure-your-linode-for-reverse-dns/), to set up a *pointer record* (PTR). Make sure you set it to `box.example.com`. This step is very important to execute and pass some antispam checks. Without it, a lot of mail servers will flag your outbound email as spam and will consider it suspicious that your IP doesn't point to your domain name, and sometimes even reject it.

## Conclusion

As you can see, it's very convenient when everything for an email server is packaged in one place and automagically configured. But convenience often has a price. Mail-in-a-box's centralization - that makes it easy to manage everything - also creates a single point of failure. There is a safety net though: email servers are intelligent enough to retry sending you their data for a few days, in case your server is unavailable.
As you can see, it's very convenient when everything for an email server is packaged in one place and automatically configured. But convenience often has a price. Mail-in-a-box's centralization - that makes it easy to manage everything - also creates a single point of failure. There is a safety net though: email servers are intelligent enough to retry sending you their data for a few days, in case your server is unavailable.

But if you can't afford the delay, you should look at ways to make your setup more reliable. A beginner friendly approach is to set up a monitoring system that will notify you quickly in case of problems. Later on, you can look into secondary (slave) nameservers, secondary MX entries, cloning and syncing Mail-in-a-Box machines, so they can take over in case of failure and floating IPs.
If you can't afford the delay, you should look at ways to make your setup more reliable. A beginner friendly approach is to set up a monitoring system that will notify you quickly in case of problems. Later on, you can look into secondary (slave) nameservers, secondary MX entries, cloning and syncing Mail-in-a-Box machines, and floating IPs.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading