hostnamectl set-hostname mail.example.com
vi /etc/hosts
127.0.0.1 mail.example.com mail
wget https://github.com/iredmail/iRedMail/archive/1.4.0.tar.gz
tar xvfz 1.4.0.tar.gz
cd iRedMail-1.4.0
chmod +x iRedMail.sh
sudo ./iRedMail.sh
[ Welcome and thanks for your use ] ->
[ Default mail storage path ] -> (if you need, you can change the path)
[ Preferred web server ] -> Nginx
[ Choose preferred backend used to store mail accounts ] -> PostgresSQL
[ Your first mail domain name ] -> mail.example.com (change it to yours)
[ Password for the mail domain administrator ] -> PASSWORD
[ Optional components ] -> SOGo, netdata, iRedAdmin, Fail2ban
Continue? [y|N] y
< Question > ... with SSHD ports: xx. [Y|n]
sudo cp [public key, fullchain.pem] /etc/ssl/certs/iRedMail.crt
sudo cp [private key, privkey.pem] /etc/ssl/private/iRedMail.key
https://mail.example.com/iredadmin/
postmaster@mail.example.com
PASSWORD
[Login]
...
# Common
https://mail.example.com
# RoundCube
https://mail.example.com/mail/
# SOGo
https://mail.example.com/SOGo