|
|
@ -3,18 +3,34 @@ |
|
|
|
## create dirs |
|
|
|
|
|
|
|
``` |
|
|
|
mkdir -p /srv/volumes/mailserver/{db,mail,ssl} |
|
|
|
chown -R 5000:5000 /srv/volumes/mailserver |
|
|
|
chmod go-rwx /srv/volumes/mailserver/ssl |
|
|
|
sudo mkdir -p /srv/vol/mailsrv/{db,mail,ssl} |
|
|
|
sudo chown -R 5000:5000 /srv/vol/mailsrv |
|
|
|
sudo chmod go-rwx /srv/vol/mailsrv/ssl |
|
|
|
``` |
|
|
|
put your `users` and `aliases.d` in the `db` directory. Mail will go in the `mail` directory. |
|
|
|
|
|
|
|
``` |
|
|
|
sudo -i |
|
|
|
cd /srv/vol/mailsrv/db |
|
|
|
mkdir aliases.d |
|
|
|
``` |
|
|
|
|
|
|
|
create aliases as needed |
|
|
|
|
|
|
|
``` |
|
|
|
vi /srv/vol/mailsrv/db/users |
|
|
|
``` |
|
|
|
|
|
|
|
format is like a passwd file with user:passwd (no spaces between) |
|
|
|
|
|
|
|
make sure that all files are owned by 5000:5000 |
|
|
|
|
|
|
|
## make sure mail ports are open |
|
|
|
|
|
|
|
add the following directives to the `myfirewall` chain in `/etc/nftables`: |
|
|
|
add the following directives to the `myfirewall` chain in `/etc/nftables.conf`: |
|
|
|
``` |
|
|
|
# accept incoming SMTP(s) connections |
|
|
|
tcp dport {25, 465, 587} accept |
|
|
|
tcp dport {25, 587} accept |
|
|
|
|
|
|
|
# accept incoming IMAP(s) connections |
|
|
|
tcp dport {143, 993} accept |
|
|
|