Installare Zimbra su Ubuntu

Settembre 29, 2021 By luca@studiomondello.eu

Preparare il sistema

snap install core; sudo snap refresh core

apt-get remove certbot

snap install --classic certbot

ln -s /snap/bin/certbot /usr/bin/certbot

certbot renew --dry-run

sudo hostnamectl set-hostname mailserver.DOMINIO.it

nano /etc/hosts

192.168.1.235 mailserver.DOMINIO.it mailserver

Installazione Zimbra

Versione 8.8.15 Ubuntu 18

https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz

Versione 8.8.15 Ubuntu 20

https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz

Versione 9

wget download.zextras.com/zcs-9.0.0_OSE_UBUNTU18_latest-zextras.tgz

tar -zxvf zcTAB

cd zcTAB

./install.sh

Non installare dns caches

Installare Certificato

certbot certonly --standalone -d mailserver.DOMINIO.it --preferred-chain "ISRG Root X1"

cp /etc/letsencrypt/live/mailserver.DOMINIO.IT/privkey.pem /opt/zimbra/ssl/zimbra/commercial/commercial.key

chown zimbra:zimbra /opt/zimbra/ssl/zimbra/commercial/commercial.key

wget -O /tmp/ISRG-X1.pem https://letsencrypt.org/certs/isrgrootx1.pem.txt

cat /tmp/ISRG-X1.pem >> /etc/letsencrypt/live/mailserver.DOMINIO.IT/chain.pem

mkdir /opt/zimbra/ssl/letsencrypt

cp /etc/letsencrypt/live/mailserver.DOMINIO.it/* /opt/zimbra/ssl/letsencrypt/

chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/*

su zimbra

zmcontrol stop

cd /opt/zimbra/ssl/letsencrypt

/opt/zimbra/bin/zmcertmgr verifycrt comm privkey.pem cert.pem chain.pem

cp -a /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra.$(date "+%Y%m%d")

/opt/zimbra/bin/zmcertmgr deploycrt comm cert.pem chain.pem

zmcontrol start

Installare Zextras

wget http://download.zextras.com/zextras_suite-latest.tgz

tar -zxvf zextras_suite-latest.tgz

cd zextras_suite

./install.sh all

Zextras Backup su disco dedicato

mkdir /media/zextrasbackup

fdisk -l

fdisk /dev/sdb

o

n

p

3 volte enter

w

mkfs.ext4 /dev/sdb1

sudo blkid

echo 'UUID=a0412828-5a2d-4803-82b0-1c0aa802d8c4 /media/zextrasbackup ext4 rw,defaults 0 0' >>/etc/fstab

sudo mount -a

chown zimbra:zimbra /media/zextrasbackup/

Disabilitare avviso loop al 100%

zmlocalconfig -e zmstat_df_excludes='/dev/loop0:/dev/loop1:/dev/loop2:/dev/loop3:/dev/loop4:/dev/loop5:/dev/loop6'

zmstatctl restart

Creare DKIM

/opt/zimbra/libexec/zmdkimkeyutil -a -d dominio.it

Dimensioni Messaggio e allegati

Imposrtazione attuale

postconf message_size_limit

Aumentare a 5MB dimensione messaggio

zmprov modifyConfig zimbraMtaMaxMessageSize 5120000

postfix reload

Dimensione allegati a 50mb

zmprov modifyConfig zimbraFileUploadMaxSize 50000000

postfix reload