Backup old emails
zip -r archive-name.zip directory-name
Test the ZIPed File if it is Valid
unzip -t archive-name.zip
For more zip and unzip command click here.
Install iRedMail on Debian or Ubuntu Linux
System Requirements
To install iRedMail on Debian or Ubuntu Linux, you need:
-
- A FRESH, working Debian/Ubuntu Linux. [Supported OS]
- At least 4 GB memory is required for a low traffic production mail server with spam/virus scanning enabled..
- Make sure 3 UID/GID are not used by other user/group: 2000, 2001, 2002.
Preparations
On Debian/Ubuntu Linux, hostname is set in two files: /etc/hostname and /etc/hosts.
- For short hostname, not Fully Qualified Domain Name (FQDN).
vi /etc/hostname
Short hostname example
imail
- Static table lookup for hostnames.
vi /etc/hosts
Part of file: /etc/hosts
127.0.0.1 mx.example.com mx localhost localhost.localdomain
Warning: Please list the FQDN hostname as first item.
Verify the FQDN hostname.
hostname -f
If it wasn’t changed after updating above two files, please reboot server to make it work.
Update software repositories
sudo apt update
Install available software updates
sudo apt upgrade
Enable default official Debian/Ubuntu apt repositories
- iRedMail needs official Debian/Ubuntu apt repositories, please enable them in /etc/apt/sources.list.
cat /etc/apt/sources.list
Usually the repositories with the description main are the official supported repositories.
- Install package gzip so that you can uncompress downloaded iRedMail package.
sudo apt-get install gzip
Download the latest release of iRedMail
- Download page
- Upload it to your root directory or run
wget https://github.com/iredmail/iRedMail/archive/1.6.2.tar.gz
- Uncompress iRedMail tarball on root
tar zxf iRedMail-x.y.z.tar.gz
Replace x.y.z by the real version number
Start iRedMail installer cd /root/iRedMail-x.y.z/ bash iRedMail.sh
Welcome and thanks for your use >> Press Enter
Specify location to store all mailboxes. Default is /var/vmail/. >> Press Enter
Choose backend used to store mail accounts. You can manage mail accounts with iRedAdmin, our web-based iRedMail admin panel.
Note
There’s no big difference between available backends, so it’s strongly recommended to choose the one you’re familiar with for easier management and maintenance after installation.
If you choose to store mail accounts in OpenLDAP, iRedMail installer will ask to set the LDAP suffix.
To MySQL/MariaDB/PostgreSQL users
If you choose to store mail accounts in MySQL/MariaDB/PostgreSQL, iRedMail installer will generate a random, strong password for you. You can find it in file iRedMail.tips.
Add your first mail domain name
Set password of admin account of your first mail domain.
Note: This account is an admin account and a mail user. That means you can login to webmail and admin panel (iRedAdmin) with this account, login username is full email address.
Choose optional components
Which webmail should you choose? Roundcube or SOGo?
- Roundcube is a fast and lightweight webmail.
- SOGo offers webmail, calendar (CalDAV), contacts (CardDAV) and ActiveSync.
- It’s ok to install both, but you can only manage mail filters with Roundcube in this case.