No description
dovecot | ||
nginx@23f8ec7ad5 | ||
pam.d | ||
postfix | ||
skel | ||
systemd/system | ||
procmailrc | ||
README.md |
Base Config
Note: The Mail Server requires SSL certificates
Swap File
- Run
dd if=/dev/zero of=/swapfile bs=1M count=2048
thenchmod 600 /swapfile
followed bymkswap /swapfile
andswapon /swapfile
- Set the system up to mount the swap file at boot by adding
/swapfile none swap defaults 0 0
to the bottom of/etc/fstab
Web Server
Package Requirements (FIXME: other php packages)
nginx, php, php-fpm, mariadb, bower, gulp, letsencrypt
Folders (FIXME: add php folder and configs)
nginx, php, systemd
Setup Instructions (FIXME: add mysql setup instructions)
- Install the packages in the
Package Requirements
above - Copy the folders above that aren't already configured to their equivalent location in
/etc
- In
/etc/nginx/sites-available/REPLACEME.TLD.conf
and/etc/systemd/system/letsencrypt.service
, replace instances ofREPLACEME.TLD
with the FQDN - Rename
/etc/nginx/sites-available/REPLACEME.TLD.conf
so thatREPLACEME.TLD
is replaced with the FQDN - Add your site files to
/srv/http/REPLACEME.TLD
where public assets are located in/srv/http/REPLACEME.TLD/public
(replacingREPLACEME.TLD
with the FQDN) - Create a symlink from
/etc/nginx/sites-available/REPLACEME.tld.conf
to/etc/nginx/sites-enabled/REPLACEME.tld.conf
(replacingREPLACEME.TLD
with the FQDN) - Run
systemctl start php-fpm nginx
to start the web services andsystemctl status php-fpm
andsystemctl status nginx
to check for errors - If there were no errors in the previous command, run
systemctl enable postfix dovecot
to enable the web services at boot - Ensure the public web directory exists and run
systemctl start letsencrypt
to generate the SSL certificates - Run
systemctl enable letsencrypt.timer
to enable the auto-renewal process
Mail Server
Package Requirements
dovecot, postfix, procmail
Folders
dovecot, pam.d, postfix, procmailrc, skel, systemd
Setup Instructions
- Install the packages in the
Package Requirements
above - Copy the folders above that aren't already configured to their equivalent location in
/etc
- In
/etc/dovecot/dovecot.conf
and/etc/postfix/main.cf
, replace instances ofREPLACEME.TLD
with the FQDN - In
/etc/postfix/aliases
, replace the instance ofREPLACEME
with the user that should receive domain-level emails - Run
newaliases
to update the aliases database with the contents of/etc/postfix/aliases
- Run
systemctl start postfix dovecot
to start the mail services andsystemctl status postfix
andsystemctl status dovecot
to check for errors - If there were no errors in the previous command, run
systemctl enable postfix dovecot
to enable the mail services at boot
Add Accounts
- Create an account by running
useradd -m -d /home/REPLACEME -s /bin/bash REPLACEME
(replacingREPLACEME
with the username associated with the mail account) - Set the password by running
passwd REPLACEME
(replacingREPLACEME
with the username associated with the mail account)