mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2026-10-16 12:33:58 +00:00
Unified installer.sh
This commit is contained in:
parent
a8bcc85fa5
commit
b88b91ba6f
2 changed files with 44 additions and 515 deletions
|
|
@ -2,32 +2,30 @@
|
|||
|
||||
###############
|
||||
#//
|
||||
#// Ubuntu specific
|
||||
#// Alpine specific
|
||||
#//
|
||||
###############
|
||||
# Update and install
|
||||
apt remove -y nano* exim*
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt dist-upgrade -y
|
||||
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
|
||||
apt install -y \
|
||||
ca-certificates \
|
||||
git wget bind9-host acl dbconfig-no-thanks \
|
||||
rsyslog \
|
||||
nginx \
|
||||
mariadb-server mariadb-client postfix-mysql dovecot-mysql \
|
||||
php php-fpm php-imap php-mbstring php-mysql php-json php-curl php-zip php-xml php-bz2 php-intl php-gmp php-net-ldap3 php-imagick php-common php-gd php-sqlite3 php-cli \
|
||||
postfix postfix-pcre \
|
||||
dovecot-core dovecot-imapd dovecot-lmtpd \
|
||||
postfix-policyd-spf-python opendkim opendkim-tools \
|
||||
opendmarc
|
||||
apt autoremove -y
|
||||
apt clean
|
||||
rm -r -f /var/lib/apt/lists
|
||||
# Pre-create vmail user
|
||||
addgroup -g 600 vmail
|
||||
adduser -S -D -h /var/vmail -u 600 -G vmail vmail
|
||||
|
||||
# Create vmail user
|
||||
adduser vmail --system --group --uid 600 --disabled-login --home /var/vmail/ --quiet
|
||||
# Update and install
|
||||
apk add --no-cache \
|
||||
nginx \
|
||||
mariadb mariadb-client \
|
||||
ca-certificates acl \
|
||||
git wget bind-tools \
|
||||
postfix postfix-mysql postfix-pcre \
|
||||
dovecot dovecot-mysql dovecot-lmtpd \
|
||||
postfix-policyd-spf-perl opendkim opendkim-utils \
|
||||
opendmarc \
|
||||
php php-fpm php-imap php-mbstring php-mysqli php-curl php-zip php-xml php-bz2 php-intl php-gmp php-ldap php-common php-gd php-sqlite3 \
|
||||
php-session php-pdo_mysql php-dom php-ctype
|
||||
|
||||
# Nginx
|
||||
sed '/^http {/a\ \
|
||||
types_hash_max_size 4096;\ \
|
||||
server_names_hash_bucket_size 128;\n' -i /etc/nginx/nginx.conf
|
||||
|
||||
###############
|
||||
#//
|
||||
|
|
@ -46,7 +44,7 @@ mkdir /etc/postfix/sql
|
|||
install -m 1777 -d /run/mysqld
|
||||
|
||||
# DKIM/DMARC
|
||||
mkdir /{run,etc}/{opendkim,opendmarc}
|
||||
mkdir /{run,etc}/{opendkim,opendmarc} >/dev/null 2>&1
|
||||
install -o opendkim -g postfix -d /var/spool/postfix/opendkim/
|
||||
install -m 750 -o opendmarc -g postfix -d /var/spool/postfix/opendmarc/
|
||||
|
||||
Loading…
Reference in a new issue