35 lines
597 B
Bash
35 lines
597 B
Bash
|
#!/bin/bash
|
||
|
#
|
||
|
# vmail-stack
|
||
|
# https://git.stack-source.com/msb/vmail-stack
|
||
|
# MIT License Copyright (c) 2021 Matthew Saunders Brown
|
||
|
|
||
|
# load config
|
||
|
source /opt/stack/include/config.inc
|
||
|
|
||
|
# check for and set virtualhost
|
||
|
if [ -n "$1" ]; then
|
||
|
virtualhost=$1
|
||
|
else
|
||
|
echo "virtualhost not set"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
check that IP points here
|
||
|
install le cert
|
||
|
create dovecot conf
|
||
|
vhost-enable
|
||
|
|
||
|
|
||
|
dkim
|
||
|
_dmarc.example.com 3600 TXT "v=DMARC1; p=reject;"
|
||
|
letsencrypt-certonly.sh
|
||
|
vmail.sh create domain
|
||
|
vhost VHostMAIL
|
||
|
dovecot/sites.d/
|
||
|
|
||
|
|
||
|
# enable webmail vhost & restart apache
|
||
|
webmail-enable.sh $virtualhost
|
||
|
|