Installation iRedMail
System Requirements
To install iRedMail on Debian or Ubuntu Linux, you need:
- A FRESH, working Debian/Ubuntu Linux. Supported releases are listed on Download page
- 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
First steps
Install Debian server from scratch
Run ubuntusecure.sh
Installation
https://docs.iredmail.org/install.iredmail.on.debian.ubuntu.html#start-iredmail-installer
Postinstallation
install webmin
install phpldapadmin
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-openldap-and-phpldapadmin-on-ubuntu-16-04
https://forum.iredmail.org/topic14529-install-phpldapadmin-nginx.html
install check_mk agent
Local Firewall Configuration
apt remove nftables
open ports:
| Protocol |
port |
misc |
| HTTP |
80 |
|
| HTTPS |
443 |
recommended |
| LDAP |
389 |
|
| LDAPS |
636 |
recommended |
| POP3/STARTTLS | 110 |
recommended |
| POS3/SSL | 995 |
|
| IMAP/STARTLS | 143 |
recommended |
| IMAP/SSL | 993 |
|
| SMTP/STARTTLS | 587 |
recommended |
| SMTP/SSl |
465 |
|
| SSH |
22 |
|
| Webmin |
12321 | |
| check_mk |
6556 |
Install ufw
apt update
apt install ufw
Configure ufw
ufw default deny incoming
# Allow SSH (Port 22)
ufw allow 22/tcp
# Allow HTTP (Port 80) and HTTPS (Port 443) for web services (Roundcube/SOGo)
#ufw allow 80/tcp
ufw allow 443/tcp
# Allow SMTP (Port 25) for email sending
sudo ufw allow 25/tcp
# Allow IMAP (Port 143) and IMAPS (Port 993) for email access
ufw allow 143/tcp
ufw allow 993/tcp
# Allow POP3 (Port 110) and POP3S (Port 995) for email access
ufw allow 110/tcp
ufw allow 995/tcp
# Allow LDAP (Port 389) and LDAPS (Port 636) for secure LDAP communication
ufw allow 636/tcp
ufw allow 389/tcp
# Allow SMTPS (Port 465) for secure SMTP communication
ufw allow 465/tcp
# Allow port 12321 (Webmin) for system administration
ufw allow 12321/tcp
# Allow SMTP/STARTTLS
ufw allow 587
# Allow port 6556 (Checkmk) for monitoring purposes
ufw allow 6556/tcp
ufw enable
ufw status
# Logging: Enable logging to monitor ufw activity:
ufw logging on
Outgoing Traffic: By default, ufw allows all outgoing traffic.
Enable all E-Mails from simmy.ch
python3 /opt/iredapd/tools/greylisting_admin.py --disable --from @simmy.ch
LDAP Repl
LDAP Schema update
| Schema openldap.simmy.ch | Schema mail.simmy.ch |
| core | core |
| collective | collective |
| corba | corba |
| cosine | cosine |
| duaconf | duaconf |
| dyngroup | dyngroup |
| inetorgperson | inetorgperson |
| java | java |
| kerberos | |
| ldapns | |
| misc | misc |
| nis |
nis |
| openldap | openldap |
| openssh-lpk | |
| pmi | pmi |
| ppolicy | |
| samba | |
| namedobject | |
| msuser | |
| iredmail | |
| dsee | |
| amavis | |
| calentry | |
| calresource |
No Comments