Jump to content

IRedMail: Difference between revisions

From Wiki
No edit summary
 
Line 22: Line 22:
Enter command <code>hostname -f</code> to view the current hostname:
Enter command <code>hostname -f</code> to view the current hostname:


<syntaxhighlight lang="bash">
$ hostname -f
$ hostname -f
mx.example.com
mx.example.com
</syntaxhighlight>


On Debian/Ubuntu Linux, hostname is set in two files: <code>/etc/hostname</code> and <code>/etc/hosts</code>.
On Debian/Ubuntu Linux, hostname is set in two files: <code>/etc/hostname</code> and <code>/etc/hosts</code>.
Line 33: Line 31:
* <code>/etc/hostname</code>: short hostname, not FQDN.
* <code>/etc/hostname</code>: short hostname, not FQDN.


<syntaxhighlight lang="bash">
mx
mx
</syntaxhighlight>
   
   


* <code>/etc/hosts</code>: static table lookup for hostnames. '''Warning''': Please list the FQDN hostname as first item.
* <code>/etc/hosts</code>: static table lookup for hostnames. '''Warning''': Please list the FQDN hostname as first item.


<syntaxhighlight lang="bash">
# Part of file: /etc/hosts
# Part of file: /etc/hosts
127.0.0.1  mx.example.com mx localhost localhost.localdomain
127.0.0.1  mx.example.com mx localhost localhost.localdomain
</syntaxhighlight>


Verify the FQDN hostname. If it wasn't changed after updating above two files, please reboot server to make it work.
Verify the FQDN hostname. If it wasn't changed after updating above two files, please reboot server to make it work.


<syntaxhighlight lang="bash">
$ hostname -f
$ hostname -f
mx.example.com
mx.example.com
</syntaxhighlight>


=== Enable default official Debian/Ubuntu apt repositories ===
=== Enable default official Debian/Ubuntu apt repositories ===
Line 56: Line 48:
* iRedMail needs official Debian/Ubuntu apt repositories, please enable them in <code>/etc/apt/sources.list</code>.
* iRedMail needs official Debian/Ubuntu apt repositories, please enable them in <code>/etc/apt/sources.list</code>.
* Install package <code>gzip</code> so that you can uncompress downloaded iRedMail package.
* Install package <code>gzip</code> so that you can uncompress downloaded iRedMail package.
<syntaxhighlight lang="bash">
 
sudo apt-get install gzip
sudo apt-get install gzip
</syntaxhighlight>


=== Download the latest release of iRedMail ===
=== Download the latest release of iRedMail ===
Line 65: Line 56:
* Upload iRedMail to your mail server via ftp or scp or whatever method you can use, login to the server to install iRedMail. We assume you uploaded it to <code>/root/iRedMail-x.y.z.tar.gz</code> (replace x.y.z by the real version number).
* Upload iRedMail to your mail server via ftp or scp or whatever method you can use, login to the server to install iRedMail. We assume you uploaded it to <code>/root/iRedMail-x.y.z.tar.gz</code> (replace x.y.z by the real version number).
* Uncompress iRedMail tarball:
* Uncompress iRedMail tarball:
<syntaxhighlight lang="bash">
 
cd /root/
cd /root/
tar zxf iRedMail-x.y.z.tar.gz
tar zxf iRedMail-x.y.z.tar.gz
</syntaxhighlight>


=== Start iRedMail installer===
=== Start iRedMail installer===
It's now ready to start iRedMail installer, it will ask you several simple questions, that's all required to setup a full-featured mail server.
It's now ready to start iRedMail installer, it will ask you several simple questions, that's all required to setup a full-featured mail server.


<syntaxhighlight lang="bash">cd /root/iRedMail-x.y.z/
cd /root/iRedMail-x.y.z/
bash iRedMail.sh</syntaxhighlight>
bash iRedMail.sh


==Terkait==
==Terkait==
*[[iRedMail: Locations of configuration and log files]]
*[[iRedMail: Locations of configuration and log files]]
== Source ==
== Source ==
* [https://docs.iredmail.org/install.iredmail.on.debian.ubuntu.html iredmail.org]
* [https://docs.iredmail.org/install.iredmail.on.debian.ubuntu.html iredmail.org]
* [https://www.linuxbabe.com/mail-server/ubuntu-22-04-iredmail-email-server linuxbabe.com]
* [https://www.linuxbabe.com/mail-server/ubuntu-22-04-iredmail-email-server linuxbabe.com]
[[Category:Server]]
[[Category:Server]]
[[Category:Linux]]
[[Category:Linux]]

Latest revision as of 15:49, 13 November 2025

iRedMail is a shell script that automatically installs and configures all necessary mail server components on your Linux/BSD server, thus eliminating manual installation and configuration. With iRedMail, you can easily create unlimited mailboxes and unlimited mail domains in a web-based admin panel. Mailboxes can be stored in MariaDB/MySQL, PostgreSQL database, or OpenLDAP. The following is a list of open-source software that will be automatically installed and configured by iRedMail.

  • Postfix SMTP server
  • Dovecot IMAP server
  • Nginx web server to serve the admin panel and webmail
  • OpenLDAP, MySQL/MariaDB, or PostgreSQL for storing user information
  • Amavised-new for DKIM signing and verification
  • SpamAssassin for anti-spam
  • ClamAV for anti-virus
  • Roundcube webmail
  • SOGo groupware, providing webmail, calendar (CalDAV), contacts (CardDAV), tasks and ActiveSync services.
  • Fail2ban for protecting SSH
  • mlmmj mailing list manager
  • Netdata server monitoring
  • iRedAPD Postfix policy server for greylisting

Installasi

Set a fully qualified domain name (FQDN) hostname on your server

No matter your server is a testing machine or production server, it's strongly recommended to set a fully qualified domain name (FQDN) hostname.

Enter command hostname -f to view the current hostname:

$ hostname -f
mx.example.com

On Debian/Ubuntu Linux, hostname is set in two files: /etc/hostname and /etc/hosts.

On Debian/Ubuntu Linux, hostname is set in two files: /etc/hostname and /etc/hosts.

  • /etc/hostname: short hostname, not FQDN.
mx

  • /etc/hosts: static table lookup for hostnames. Warning: Please list the FQDN hostname as first item.
# Part of file: /etc/hosts
127.0.0.1   mx.example.com mx localhost localhost.localdomain

Verify the FQDN hostname. If it wasn't changed after updating above two files, please reboot server to make it work.

$ hostname -f
mx.example.com

Enable default official Debian/Ubuntu apt repositories

  • iRedMail needs official Debian/Ubuntu apt repositories, please enable them in /etc/apt/sources.list.
  • Install package gzip so that you can uncompress downloaded iRedMail package.
sudo apt-get install gzip

Download the latest release of iRedMail

  • Visit Download page to get the latest stable release of iRedMail.
  • Upload iRedMail to your mail server via ftp or scp or whatever method you can use, login to the server to install iRedMail. We assume you uploaded it to /root/iRedMail-x.y.z.tar.gz (replace x.y.z by the real version number).
  • Uncompress iRedMail tarball:
cd /root/
tar zxf iRedMail-x.y.z.tar.gz

Start iRedMail installer

It's now ready to start iRedMail installer, it will ask you several simple questions, that's all required to setup a full-featured mail server.

cd /root/iRedMail-x.y.z/
bash iRedMail.sh

Terkait

Source