VER=1.6.3<\/code><\/pre>\n\n\n\nwget https:\/\/github.com\/iredmail\/iRedMail\/archive\/refs\/tags\/${VER}.tar.gz<\/pre>\n\n\n\nOnce the download is complete, extract the archive\/<\/p>\n\n\n\n
tar xzf ${VER}.tar.gz<\/pre>\n\n\n\nLaunch iRedMail Mail server installer<\/h4>\n\n\n\n Navigate to iRedMail source directory and run the installer script as shown below;<\/p>\n\n\n\n
cd iRedMail-${VER}<\/code><\/pre>\n\n\n\nbash iRedMail.sh<\/code><\/pre>\n\n\n\nDuring the installation, you will be prompted to answer several questions required to setup iRedMail mail server.<\/p>\n\n\n\n
Press ENTER<\/strong> to continue.<\/p>\n\n\n\nThe setup is interactive and the first screen welcomes you and thank you for using iRedMail.<\/p>\n\n\n
\n
<\/figure><\/div>\n\n\nPress Enter<\/strong> to accept and proceed with the installation. As stated, you can press Ctrl+c<\/strong> cancel the installation.<\/p>\n\n\n\nOn the next screen, you are required to provide a full path where user mailboxes will be stored. The default path is \/var\/vmail<\/code>.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\nAfter that, select Next<\/strong> to choose the web server to use. In this case, am going with the default, Nginx.<\/strong><\/p>\n\n\n\n
<\/figure><\/div>\n\n\nNext, you are required to choose the backend to store your mail accounts. In this case, we are going to select MySQL database as our backend. Use up <\/strong>and down<\/strong> arrow keys move between the options. Press Space Bar<\/strong> to select your option.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\nNext, you need to the set the MySQL root user password on the localhost server (127.0.0.1)<\/p>\n\n\n\n <\/figure>\n\n\n\nAfter that, proceed to the next screen to set your first mail domain.<\/p>\n\n\n
\n
<\/figure><\/div>\n\n\nSet the password for the mail domain administrator. postmaster@domain.com<\/strong> is configured by default.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\nIn the next screen, your are prompted to choose some of optional components that can be used to add extra functionalities your mail server. Select the components you require and press Next to proceed.<\/p>\n\n\n
\n
<\/figure><\/div>\n\n\nYou are then required to review all the options you have chosen. iRedMail will install and configure the appropriate packages.<\/p>\n\n\n\n
\n*************************************************************************\n***************************** WARNING ***********************************\n*************************************************************************\n* *\n* Below file contains sensitive infomation (username\/password), please *\n* do remember to *MOVE* it to a safe place after installation. *\n* *\n* * \/root\/iRedMail-1.6.3\/config\n* *\n*************************************************************************\n********************** Review your settings *****************************\n*************************************************************************\n\n* Storage base directory: \/var\/vmail\n* Mailboxes: \n* Daily backup of SQL\/LDAP databases: \n* Store mail accounts in: MariaDB\n* Web server: Nginx\n* First mail domain name: kifarunix-demo.com\n* Mail domain admin: postmaster@kifarunix-demo.com\n* Additional components: Roundcubemail SOGo netdata iRedAdmin Fail2ban\n\n< Question > Continue? [y|N]y\n<\/code><\/pre>\n\n\n\nIf all the options are fine, type y<\/strong> and press Enter<\/strong> to proceed with installation.<\/p>\n\n\n\nAfter the installation, you are prompted on whether to use firewall rules provided by iRedMail. Type y<\/strong> and press Enter <\/strong>to accept.<\/p>\n\n\n\n\n======= Important SOGo post-installation note =======\n\nSOGo database schemas are _not_ automatically upgraded by\nthe packaging system.\n\nPlease check the list of database schema upgrade scripts\ninside \/usr\/share\/doc\/sogo\/ and apply them if needed.\n\nMore details can be found in the Upgrading section:\nhttps:\/\/sogo.nu\/files\/docs\/SOGoInstallationGuide.html#_upgrading\n\nSetting up sogo-activesync (5.8.4.20230712-1) ...\nProcessing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...\nProcessing triggers for ufw (0.36.1-4build1) ...\nProcessing triggers for man-db (2.10.2-1) ...\nProcessing triggers for dbus (1.12.20-2ubuntu4.1) ...\nProcessing triggers for libc-bin (2.35-0ubuntu3.1) ...\nProcessing triggers for php8.1-cli (8.1.2-1ubuntu2.13) ...\nProcessing triggers for dovecot-core (1:2.3.16+dfsg1-3ubuntu2.2) ...\nProcessing triggers for php8.1-fpm (8.1.2-1ubuntu2.13) ...\nNEEDRESTART-VER: 3.5\nNEEDRESTART-KCUR: 5.15.0-76-generic\nNEEDRESTART-KEXP: 5.15.0-76-generic\nNEEDRESTART-KSTA: 1\nNEEDRESTART-SVC: dbus.service\nNEEDRESTART-SVC: networkd-dispatcher.service\nNEEDRESTART-SVC: systemd-logind.service\nNEEDRESTART-SVC: unattended-upgrades.service\nNEEDRESTART-SVC: user@1000.service\n\n********************************************************************\n* Start iRedMail Configurations\n********************************************************************\n[ INFO ] Generate self-signed SSL cert (4096 bits, expire in 10 years).\n[ INFO ] Generate Diffie Hellman Group with openssl, please wait.\n[ INFO ] Create required system accounts.\n[ INFO ] Configure MariaDB database server.\n[ INFO ] Setup daily cron job to backup SQL databases with \/var\/vmail\/backup\/backup_mysql.sh\n[ INFO ] Configure Postfix (MTA).\n[ INFO ] Configure Dovecot (POP3\/IMAP\/Managesieve\/LMTP\/LDA).\n[ INFO ] Configure Nginx web server.\n[ INFO ] Configure PHP.\n[ INFO ] Configure mlmmj (mailing list manager).\n[ INFO ] Configure ClamAV (anti-virus toolkit).\n[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).\n[ INFO ] Configure SpamAssassin (content-based spam filter).\n[ INFO ] Configure iRedAPD (postfix policy daemon).\n[ INFO ] Configure iRedAdmin (official web-based admin panel).\n[ INFO ] Configure Roundcube webmail.\n[ INFO ] Configure SOGo Groupware (Webmail, Calendar, Address Book, ActiveSync).\n[ INFO ] Configure Fail2ban (authentication failure monitor).\n[ INFO ] Configure netdata (system and application monitor).\n\n*************************************************************************\n* iRedMail-1.6.3 installation and configuration complete.\n*************************************************************************\n\n< Question > Would you like to use firewall rules provided by iRedMail?\n< Question > File: \/etc\/nftables.conf, with SSHD ports: 22. [Y|n] y\n<\/code><\/pre>\n\n\n\nAfter that, restart firewall;<\/p>\n\n\n\n
< Question > Restart firewall now (with ssh ports: 22)? [y|N]y<\/code><\/pre>\n\n\n\nAt the end of it, you will be presented with useful links to access various components of the iRedMail server.<\/p>\n\n\n\n
\n[ INFO ] Updating ClamAV database (freshclam), please wait ...\n********************************************************************\n* URLs of installed web applications:\n*\n* - Roundcube webmail: https:\/\/mx.kifarunix-demo.com\/mail\/\n* - SOGo groupware: https:\/\/mx.kifarunix-demo.com\/SOGo\/\n* - netdata (monitor): https:\/\/mx.kifarunix-demo.com\/netdata\/\n*\n* - Web admin panel (iRedAdmin): https:\/\/mx.kifarunix-demo.com\/iredadmin\/\n*\n* You can login to above links with below credential:\n*\n* - Username: postmaster@kifarunix-demo.com\n* - Password: hacker\n*\n*\n********************************************************************\n* Congratulations, mail server setup completed successfully. Please\n* read below file for more information:\n*\n* - \/root\/iRedMail-1.6.3\/iRedMail.tips\n*\n* And it's sent to your mail account postmaster@kifarunix-demo.com.\n*\n********************* WARNING **************************************\n*\n* Please reboot your system to enable all mail services.\n*\n********************************************************************\n<\/code><\/pre>\n\n\n\nReboot the Server<\/h4>\n\n\n\n You mail server is successfully setup. Restart your server to enable all mail services<\/p>\n\n\n\n
systemctl reboot -i<\/pre>\n\n\n\niRedMail Tips<\/h4>\n\n\n\n You can also read the file, ~\/iRedMail-${VER}\/iRedMail.tips, <\/strong>to find out more information about your mail server.<\/p>\n\n\n\nSample;<\/p>\n\n\n\n
\nAdmin of domain kifarunix-demo.com:\n\n * Account: postmaster@kifarunix-demo.com\n * Password: fA7o9zqkuBhgaofYbAdx\n\n You can login to iRedAdmin with this account, login name is full email address.\n\nFirst mail user:\n * Username: postmaster@kifarunix-demo.com\n * Password: fA7o9zqkuBhgaofYbAdx\n * SMTP\/IMAP auth type: login\n * Connection security: STARTTLS or SSL\/TLS\n\n You can login to webmail with this account, login name is full email address.\n\n* Enabled services: rsyslog postfix mysql nginx php8.1-fpm dovecot clamav-daemon amavis clamav-freshclam sogo memcached fail2ban cron nftables\n\n\nSSL cert keys (size: 4096):\n - \/etc\/ssl\/certs\/iRedMail.crt\n - \/etc\/ssl\/private\/iRedMail.key\n\nMail Storage:\n - Mailboxes: \/var\/vmail\/vmail1\n - Mailbox indexes: \n - Global sieve filters: \/var\/vmail\/sieve\n - Backup scripts and backup copies: \/var\/vmail\/backup\n\nMySQL:\n * Root user: root, Password: \"fA7o9zqkuBhgaofYbAdx\" (without quotes)\n * Bind account (read-only):\n - Username: vmail, Password: MNdHNdO3O5QHhNFsFHhyeDlypPcZ4o43\n * Vmail admin account (read-write):\n - Username: vmailadmin, Password: Tvjdkqvk2n7IsyLLraeAwIC9EYHIA1Nd\n * Config file: \/etc\/mysql\/my.cnf\n * RC script: \/etc\/init.d\/mysql\n\nVirtual Users:\n - \/root\/iRedMail-1.6.3\/samples\/iredmail\/iredmail.mysql\n - \/root\/iRedMail-1.6.3\/runtime\/*.sql\n\nBackup MySQL database:\n * Script: \/var\/vmail\/backup\/backup_mysql.sh\n * See also:\n # crontab -l -u root\n\nPostfix:\n * Configuration files:\n - \/etc\/postfix\n - \/etc\/postfix\/aliases\n - \/etc\/postfix\/main.cf\n - \/etc\/postfix\/master.cf\n\n * SQL\/LDAP lookup config files:\n - \/etc\/postfix\/mysql\n\nDovecot:\n * Configuration files:\n - \/etc\/dovecot\/dovecot.conf\n - \/etc\/dovecot\/dovecot-ldap.conf (For OpenLDAP backend)\n - \/etc\/dovecot\/dovecot-mysql.conf (For MySQL backend)\n - \/etc\/dovecot\/dovecot-pgsql.conf (For PostgreSQL backend)\n - \/etc\/dovecot\/dovecot-used-quota.conf (For real-time quota usage)\n - \/etc\/dovecot\/dovecot-share-folder.conf (For IMAP sharing folder)\n * Syslog config file:\n - \/etc\/rsyslog.d\/1-iredmail-dovecot.conf (present if rsyslog >= 8.x)\n * RC script: \/etc\/init.d\/dovecot\n * Log files:\n - \/var\/log\/dovecot\/dovecot.log\n - \/var\/log\/dovecot\/sieve.log\n - \/var\/log\/dovecot\/lmtp.log\n - \/var\/log\/dovecot\/lda.log (present if rsyslog >= 8.x)\n - \/var\/log\/dovecot\/imap.log (present if rsyslog >= 8.x)\n - \/var\/log\/dovecot\/pop3.log (present if rsyslog >= 8.x)\n - \/var\/log\/dovecot\/sieve.log (present if rsyslog >= 8.x)\n * See also:\n - \/var\/vmail\/sieve\/dovecot.sieve\n - Logrotate config file: \/etc\/logrotate.d\/dovecot\n\nNginx:\n * Configuration files:\n - \/etc\/nginx\/nginx.conf\n - \/etc\/nginx\/sites-available\/00-default.conf\n - \/etc\/nginx\/sites-available\/00-default-ssl.conf\n * Directories:\n - \/etc\/nginx\n - \/var\/www\/html\n * See also:\n - \/var\/www\/html\/index.html\n\nphp-fpm:\n * Configuration files: \/etc\/php\/8.1\/fpm\/pool.d\/www.conf\n\nPHP:\n * PHP config file for Nginx: \n * Disabled functions: posix_uname,eval,pcntl_wexitstatus,posix_getpwuid,xmlrpc_entity_decode,pcntl_wifstopped,pcntl_wifexited,pcntl_wifsignaled,phpAds_XmlRpc,pcntl_strerror,ftp_exec,pcntl_wtermsig,mysql_pconnect,proc_nice,pcntl_sigtimedwait,posix_kill,pcntl_sigprocmask,fput,phpinfo,system,phpAds_remoteInfo,ftp_login,inject_code,posix_mkfifo,highlight_file,escapeshellcmd,show_source,pcntl_wifcontinued,fp,pcntl_alarm,pcntl_wait,ini_alter,posix_setpgid,parse_ini_file,ftp_raw,pcntl_waitpid,pcntl_getpriority,ftp_connect,pcntl_signal_dispatch,pcntl_wstopsig,ini_restore,ftp_put,passthru,proc_terminate,posix_setsid,pcntl_signal,pcntl_setpriority,phpAds_xmlrpcEncode,pcntl_exec,ftp_nb_fput,ftp_get,phpAds_xmlrpcDecode,pcntl_sigwaitinfo,shell_exec,pcntl_get_last_error,ftp_rawlist,pcntl_fork,posix_setuid\n\nClamAV:\n * Configuration files:\n - \/etc\/clamav\/clamd.conf\n - \/etc\/clamav\/freshclam.conf\n - \/etc\/logrotate.d\/clamav\n * RC scripts:\n + \/etc\/init.d\/clamav-daemon\n + \/etc\/init.d\/clamav-freshclam\n\nAmavisd-new:\n * Configuration files:\n - \/etc\/amavis\/conf.d\/50-user\n - \/etc\/postfix\/master.cf\n - \/etc\/postfix\/main.cf\n * RC script:\n - \/etc\/init.d\/amavis\n * SQL Database:\n - Database name: amavisd\n - Database user: amavisd\n - Database password: IKI5MIUn24SJRtqiljodR4LGzSET00cW\n\nDNS record for DKIM support:\n\n; key#1 2048 bits, s=dkim, d=kifarunix-demo.com, \/var\/lib\/dkim\/kifarunix-demo.com.pem\ndkim._domainkey.kifarunix-demo.com.\t3600 TXT (\n \"v=DKIM1; p=\"\n \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuFtsYHji0+138NLpjt7H\"\n \"2RovbYjY7MqiwAL6ixTnzSzoXWsDUf\/vY3n3HlCDlqZeHV3pU7hifSuZtVPKsCT1\"\n \"ChYn3fnaZiofhNmC2WuXA9pIoAL+0mUiNKMitj8MK3OEYLpqcIh0E2RgqMMcrvXa\"\n \"HxfsZmYIGylcF0wcn4h44t8YSzOTccacLPxdjuzT0R+dbl9pvOdzLW9NKHu0ipd1\"\n \"eomT7oPc\/pvux9+es4xjLKy1ru60cCLsaHyIVGqk+pa55PHNXTuoZz3OvLnQ1KkQ\"\n \"XV4ixI1Abz0QQ\/QjUOAV\/GePEY3VAynPhh0jPgs903jFGWJJPW1z8RRa0a8FwHMP\"\n \"2QIDAQAB\")\nSpamAssassin:\n * Configuration files and rules:\n - \/etc\/mail\/spamassassin\n - \/etc\/mail\/spamassassin\/local.cf\n\niRedAPD - Postfix Policy Server:\n * Version: 5.3\n * Listen address: 127.0.0.1, port: 7777\n * SQL database account:\n - Database name: iredapd\n - Username: iredapd\n - Password: MtZsW1ZMc9CNroZefC0IvhfXsaI9Zvjj\n * Configuration file:\n - \/opt\/iredapd\/settings.py\n * Related files:\n - \/opt\/iRedAPD-5.3\n - \/opt\/iredapd (symbol link to \/opt\/iRedAPD-5.3\n\niRedAdmin - official web-based admin panel:\n * Version: 2.3\n * Root directory: \/opt\/www\/iRedAdmin-2.3\n * Config file: \/opt\/www\/iRedAdmin-2.3\/settings.py\n * Web access:\n - URL: https:\/\/mx.kifarunix-demo.com\/iredadmin\/\n - Username: postmaster@kifarunix-demo.com\n - Password: fA7o9zqkuBhgaofYbAdx\n * SQL database:\n - Database name: iredadmin\n - Username: iredadmin\n - Password: aBQSQZ1BtOHjdThM47u400gcoMLTyLTg\n\nRoundcube webmail: \/opt\/www\/roundcubemail-1.6.1\n * Config file: \/opt\/www\/roundcubemail-1.6.1\/config\n * Web access:\n - URL: http:\/\/mx.kifarunix-demo.com\/mail\/ (will be redirected to https:\/\/ site)\n - URL: https:\/\/mx.kifarunix-demo.com\/mail\/ (secure connection)\n - Username: postmaster@kifarunix-demo.com\n - Password: fA7o9zqkuBhgaofYbAdx\n * SQL database account:\n - Database name: roundcubemail\n - Username: roundcube\n - Password: snUVImKkWSLAag43khYGuk69iUtruYZH\n * Cron job:\n - Command: \"crontab -l -u root\"\n\nSOGo Groupware:\n * Web access: httpS:\/\/mx.kifarunix-demo.com\/SOGo\/\n * Main config file: \/etc\/sogo\/sogo.conf\n * Nginx template file: \/etc\/nginx\/templates\/sogo.tmpl\n * Database:\n - Database name: sogo\n - Database user: sogo\n - Database password: H68s637rHRgE58lxVIQ0exIbP3ySIAYQ\n * SOGo sieve account (Warning: it's a Dovecot Master User):\n - file: \/etc\/sogo\/sieve.cred\n - username: sogo_sieve_master@not-exist.com\n - password: s6ovcPdzgQjLBzBqUlKiOxOfcOcH4V9v\n * See also:\n - cron job of system user: sogo\n\nnetdata (monitor):\n - Config files:\n - All config files: \/opt\/netdata\/etc\/netdata\n - Main config file: \/opt\/netdata\/etc\/netdata\/netdata.conf\n - Modified modular config files:\n - \/opt\/netdata\/etc\/netdata\/go.d\n - \/opt\/netdata\/etc\/netdata\/python.d\n - HTTP auth file (if you need a new account to access netdata, please\n update this file with command like 'htpasswd' or edit manually):\n - \/etc\/nginx\/netdata.users\n - Log directory: \/opt\/netdata\/var\/log\/netdata\n - SQL:\n - Username: netdata\n - Password: mc3J8Bi8TMZLuPEbmc3B5qAUuwyy6z4m\n - NOTE: No database required by netdata.\n<\/code><\/pre>\n\n\n\nThere is also a SENSITIVE file that you need to pay attention to; ~\/iRedMail-${VER}\/config<\/code>. This file contains usernames and passwords. Therefore, save the contents in a safe place and remove it immediately after the installation<\/p>\n\n\n\nrm ~\/iRedMail-${VER}\/config<\/pre>\n\n\n\nAccessing iRedMail Web Admin Panel<\/h3>\n\n\n\n To access the iRedMail web admin Panel, use the URL, https:\/\/<your-domain>\/iredadmin\/<\/code>. You may encounter certificate warnings. This is because self-signed certificate is used by default. You should however consider obtaining a commercial SST\/TLS certificates for use with iRedMail.<\/p>\n\n\n\nGet the details from the iRedMail.tips file.<\/p>\n\n\n