Improve the setup instructions considerably

This commit is contained in:
Kevin MacMartin 2018-03-21 16:08:08 -04:00
parent 99e027426b
commit 4774419636

View file

@ -59,17 +59,17 @@ dovecot pam.d postfix procmailrc skel systemd opendkim
1. Install the packages in the `Package Requirements` above
2. Copy the folders above that aren't already configured to their equivalent location in `/etc`
3. Add an A DNS record for the FQDN and a hostname for the server
4. Set the hostname of the server with `hostnamectl set-hostname SOMETHING.REPLACEME.TLD` where `SOMETHING.REPLACEME.TLD` is the server hostname
4. Set the hostname of the server with `hostnamectl set-hostname SOMETHING.REPLACEME.TLD` where `SOMETHING` is a unique name for the server and `REPLACEME.TLD` is the domain. This will be the server's new hostname.
5. Add the hostname of the server to the end of the line starting with `127.0.0.1` in `/etc/hosts`
6. In `/etc/dovecot/dovecot.conf` and `/etc/opendkim/opendkim.conf` replace occurances of `REPLACEME.TLD` and occurances of `REPLACEME` with the first part of the hostname
7. In `/etc/postfix/main.cf` replace `SOMETHING` with the hostname of the server and occurrences of `REPLACEME.TLD` with the domain
8. Run `opendkim-genkey -r -s REPLACEME -d REPLACEME.TLD` where `REPLACEME` is the first part of the hostname
6. In `/etc/dovecot/dovecot.conf` and `/etc/opendkim/opendkim.conf` replace occurances of `REPLACEME.TLD` with the domain, and occurances of `REPLACEME` with the first part of the domain
7. In `/etc/postfix/main.cf` replace `SOMETHING.REPLACEME.TLD` with the hostname of the server and `REPLACEME.TLD` with the domain
8. Run `opendkim-genkey -r -s REPLACEME -d REPLACEME.TLD` where `REPLACEME.TLD` is the domain, and `REPLACEME` is the first part of the domain
9. In `/etc/postfix/aliases`, replace the instance of `REPLACEME` with the user that should receive domain-level emails
10. Run `newaliases` to update the aliases database with the contents of `/etc/postfix/aliases`
11. Run `systemctl start postfix dovecot opendkim` to start the mail services and `systemctl status postfix dovecot opendkim` to check for errors
12. If there were no errors in the previous command, run `systemctl enable postfix dovecot opendkim` to enable the mail services at boot
13. Create an MX DNS record for `REPLACEME.TLD` containing the hostname (`REPLACEME.TLD` can usually be left out of the input field)
14. Create a TXT DNS record for the host `REPLACEME._domainkey.REPLACEME.TLD` containing `v=DKIM1; k=rsa; s=email; p=PASSWORD`, replacing the occurance of `REPLACEME` with the first part of the hostname and `PASSWORD` with the string following `p=` in `/etc/opendkim/REPLACEME.txt` (`REPLACEME.TLD` can usually be left out of the input field)
14. Create a TXT DNS record for the host `REPLACEME._domainkey.REPLACEME.TLD` containing `v=DKIM1; k=rsa; s=email; p=PASSWORD`, replacing the occurance of `REPLACEME` with the first part of the domain, `REPLACEME.TLD` with the full domain, and `PASSWORD` with the string following `p=` in `/etc/opendkim/REPLACEME.txt` (`REPLACEME.TLD` can usually be left out of the input field)
15. Create a TXT DNS record for the host `REPLACEME.TLD` containing `v=spf1 mx -all` (`REPLACEME.TLD` can usually be left out of the input field)
16. Create a TXT DNS record for the host `_dmarc.REPLACEME.TLD` containing `v=DMARC1; p=none` (`REPLACEME.TLD` can usually be left out of the input field)
17. Set the reverse DNS record for the VPS to the hostname