🛡️ IT & Security 🐧 Linux📮 MailserverGrommunio

grommunio auf Debian 13 installieren – Exchange-Alternative Schritt für Schritt

· Michael Harperscheidt · 8 Min. Lesezeit

grommunio auf Debian 13 installieren – Exchange-Alternative Schritt für Schritt

grommunio ist eine Groupware, die sich gegenüber den Clients wie ein Microsoft-Exchange-Server verhält: Outlook spricht nativ MAPI/HTTP, Smartphones synchronisieren per ActiveSync, dazu kommen IMAP/POP3, CalDAV/CardDAV und ein Web-Client im Browser. Der Kern heißt Gromox, verwaltet wird alles über eine Admin-Oberfläche bzw. das CLI grommunio-admin.

Für die meisten Installationen empfiehlt der Hersteller seine fertige Appliance. Wer grommunio aber in eine bestehende Debian-Landschaft einfügen will, installiert es manuell – genau darum geht es hier.

Aufbau von grommunio: Clients, nginx, Gromox-Dienste, MariaDB, Postfix

Vorab: zwei Wege

  1. Manuell nach der offiziellen Anleitung – volle Kontrolle, jeder Schritt nachvollziehbar. Das zeige ich unten.
  2. Community-Skript grommunio-setup für Debian 13 – schneller, aber weniger transparent:
apt install git
git clone https://github.com/eryx12o45/grommunio-setup.git /usr/local/share/grommunio-setup
/usr/local/share/grommunio-setup/grommunio-setup

Hinweis: Die manuelle Installation ist laut Hersteller nur für erfahrene Linux-Admins gedacht. In der Community gab es auf Debian 13 zeitweise Abhängigkeitsfehler (z. B. ein nicht installierbares Paket grommunio-triggers). Vor dem Produktivbetrieb unbedingt auf einer Testmaschine durchspielen.

Voraussetzungen

  • frisches Debian 13 „Trixie“ (amd64), Root-Zugang
  • ein fester Name (FQDN), im Beispiel mail.example.net
  • IPv6 muss aktiv sein – ::1 auf dem Loopback reicht
  • ein TLS-Zertifikat ohne Passwort, idealerweise mit allen Namen (z. B. mail. und autodiscover.)
  • DNS: A/AAAA für mail.example.net, MX der Domain auf diesen Namen, autodiscover.example.net als CNAME
  • eine Firewall, die standardmäßig alles blockiert

In allen Befehlen mail.example.net, example.net und die Passwörter durch eigene Werte ersetzen.

1. System vorbereiten

apt update && apt full-upgrade -y
apt install -y curl wget gnupg ca-certificates

hostnamectl set-hostname mail.example.net
echo "127.0.1.1 mail.example.net mail" >> /etc/hosts
exec bash --login

# IPv6 prüfen – hier muss ::1 auftauchen
ip -6 addr show lo

2. Firewall

Beispiel mit ufw. Port 8443 (Admin-Oberfläche) nur für die eigene IP freigeben:

apt install -y ufw
ufw default deny incoming
ufw allow 22/tcp     # SSH
ufw allow 25/tcp     # SMTP von anderen Mailservern
ufw allow 443/tcp    # Outlook, Web, ActiveSync
ufw allow 993/tcp    # IMAPS (optional)
ufw allow 995/tcp    # POP3S (optional)
ufw allow from 203.0.113.10 to any port 8443 proto tcp   # Admin – eigene IP eintragen
ufw enable

MariaDB (3306) und den Gromox-Port 5000 nicht nach außen öffnen.

3. grommunio-Paketquelle einbinden

wget -qO - https://download.grommunio.com/RPM-GPG-KEY-grommunio \
  | gpg --dearmor --output /usr/share/keyrings/download.grommunio.com.gpg

cat > /etc/apt/sources.list.d/grommunio.sources <<'EOF'
Types: deb
URIs: https://download.grommunio.com/community/Debian_13
Suites: Debian_13
Components: main
Signed-By: /usr/share/keyrings/download.grommunio.com.gpg
EOF

apt update

Wer eine Subskription hat, nutzt statt community das unterstützte Repository mit den Zugangsdaten aus der Lizenz.

4. Pakete installieren

apt install -y mariadb-server mariadb-client nginx \
  gromox grommunio-common grommunio-web \
  grommunio-admin-api grommunio-admin-web \
  grommunio-sync grommunio-dav grommunio-index

gromox zieht PHP-FPM mit. Debian aktiviert nach der Installation eine Standard-Webseite in nginx, die mit grommunio kollidiert – also entfernen:

rm -f /etc/nginx/sites-enabled/default

5. Datenbank anlegen

systemctl enable --now mariadb

DBPASS=$(openssl rand -hex 24)
echo "Datenbank-Passwort: $DBPASS"   # sicher notieren!

mariadb <<SQL
CREATE DATABASE grommunio;
CREATE USER 'grommunio'@'localhost' IDENTIFIED BY '$DBPASS';
GRANT ALL ON grommunio.* TO 'grommunio'@'localhost';
FLUSH PRIVILEGES;
SQL

Gromox die Zugangsdaten mitteilen und die Tabellen erzeugen:

cat > /etc/gromox/mysql_adaptor.cfg <<EOF
mysql_username=grommunio
mysql_password=$DBPASS
mysql_dbname=grommunio
schema_upgrade=host:mail.example.net
EOF
chmod 640 /etc/gromox/mysql_adaptor.cfg

gromox-dbop -C

schema_upgrade sorgt dafür, dass dieser Server das Datenbankschema bei Updates automatisch anhebt.

Die Variable $DBPASS wird in den Schritten 8 und 9 noch einmal gebraucht. Alles in derselben Shell ausführen – oder sie dort mit DBPASS='…' neu setzen.

6. TLS-Zertifikat einbinden

nginx und Gromox brauchen Zertifikat und Schlüssel. Wichtig: immer die vollständige Kette (Zertifikat plus Zwischenzertifikat) verwenden – sonst lehnen Outlook, Smartphones oder andere Programme die Verbindung ab, obwohl der Browser zufrieden ist.

Mit acme.sh lässt sich das Zertifikat an einen festen Ort kopieren und nach jeder Erneuerung automatisch neu laden:

mkdir -p /etc/grommunio-common/ssl

acme.sh --install-cert -d mail.example.net --ecc \
  --fullchain-file /etc/grommunio-common/ssl/server-bundle.pem \
  --key-file       /etc/grommunio-common/ssl/server.key \
  --reloadcmd "chgrp gromox /etc/grommunio-common/ssl/server.key && chmod 640 /etc/grommunio-common/ssl/server.key && systemctl reload nginx && systemctl restart gromox-http gromox-imap gromox-pop3"

nginx auf das Zertifikat zeigen lassen:

cat > /etc/grommunio-common/nginx/ssl_certificate.conf <<'EOF'
ssl_certificate     /etc/grommunio-common/ssl/server-bundle.pem;
ssl_certificate_key /etc/grommunio-common/ssl/server.key;
EOF

7. Gromox konfigurieren

nginx belegt die Ports 80/443 – Gromox' eigener HTTP-Dienst weicht auf 10080/10443 aus. Port 24 wird später für die Zustellung durch Postfix gebraucht:

cat >> /etc/gromox/gromox.cfg <<'EOF'
http_listen = [::]:10080
http_listen_tls = [::]:10443
lda_listen = [::]:24
EOF

cat >> /etc/gromox/http.cfg <<'EOF'
http_support_tls=yes
http_certificate_path=/etc/grommunio-common/ssl/server-bundle.pem
http_private_key_path=/etc/grommunio-common/ssl/server.key
EOF

Dienste starten:

systemctl enable --now gromox-event gromox-timer
systemctl enable --now gromox-http
systemctl enable --now gromox-midb gromox-zcore

IMAP und POP3 (optional)

Nur nötig, wenn Mail-Apps per IMAP/POP3 zugreifen sollen. TLS wird hier erzwungen:

cat >> /etc/gromox/imap.cfg <<'EOF'
imap_support_tls=true
imap_force_tls=true
imap_certificate_path=/etc/grommunio-common/ssl/server-bundle.pem
imap_private_key_path=/etc/grommunio-common/ssl/server.key
EOF

cat >> /etc/gromox/pop3.cfg <<'EOF'
pop3_support_tls=true
pop3_force_tls=true
pop3_certificate_path=/etc/grommunio-common/ssl/server-bundle.pem
pop3_private_key_path=/etc/grommunio-common/ssl/server.key
EOF

systemctl enable --now gromox-imap gromox-pop3

8. PHP-FPM, Admin-API und nginx

Debian 13 bringt PHP 8.4 mit. Den genauen Dienstnamen zeigt:

systemctl list-unit-files 'php*-fpm.service'
systemctl enable --now php8.4-fpm

Die Admin-API braucht ebenfalls die Datenbank-Zugangsdaten:

mkdir -p /etc/grommunio-admin-api/conf.d
cat > /etc/grommunio-admin-api/conf.d/database.yaml <<EOF
DB:
  host: 'localhost'
  user: 'grommunio'
  pass: '$DBPASS'
  database: 'grommunio'
EOF
chmod 640 /etc/grommunio-admin-api/conf.d/database.yaml

# Passwort für den Admin-Zugang setzen
grommunio-admin passwd

systemctl enable --now grommunio-admin-api

Zum Schluss nginx prüfen und starten:

nginx -t && systemctl enable --now nginx && systemctl reload nginx

Die Admin-Oberfläche ist jetzt unter https://mail.example.net:8443/ erreichbar, der Web-Client unter https://mail.example.net/web/.

9. Postfix für ein- und ausgehende Mail

Postfix nimmt Mails aus dem Internet an und reicht sie an Gromox weiter. Bei der Installation „Internet Site“ wählen und als Mailnamen den FQDN eintragen:

apt install -y postfix postfix-mysql

Postfix fragt die Domains und Postfächer direkt in der grommunio-Datenbank nach:

for f in mbxdom mbxmaps alias; do
  case $f in
    mbxdom)  Q="SELECT 1 FROM domains WHERE domain_status=0 AND domainname='%s'";;
    mbxmaps) Q="SELECT username FROM users WHERE username='%s'";;
    alias)   Q="SELECT mainname FROM aliases WHERE aliasname='%s'";;
  esac
  cat > /etc/postfix/$f.cf <<EOF
user = grommunio
password = $DBPASS
hosts = localhost
dbname = grommunio
query = $Q
EOF
  chmod 640 /etc/postfix/$f.cf
  chgrp postfix /etc/postfix/$f.cf
done

postconf -e virtual_mailbox_domains=mysql:/etc/postfix/mbxdom.cf
postconf -e virtual_mailbox_maps=mysql:/etc/postfix/mbxmaps.cf
postconf -e virtual_alias_maps=mysql:/etc/postfix/alias.cf,mysql:/etc/postfix/mbxmaps.cf
postconf -e virtual_transport="smtp:[localhost]:24"
postconf -e smtpd_sender_login_maps=mysql:/etc/postfix/mbxmaps.cf,mysql:/etc/postfix/alias.cf

# TLS für eingehende Verbindungen – auch hier die vollständige Kette!
postconf -e smtpd_tls_cert_file=/etc/grommunio-common/ssl/server-bundle.pem
postconf -e smtpd_tls_key_file=/etc/grommunio-common/ssl/server.key
postconf -e smtpd_tls_security_level=may

systemctl enable --now gromox-delivery gromox-delivery-queue postfix
systemctl restart gromox-delivery-queue postfix

10. Erste Domain und erstes Postfach

Entweder in der Admin-Oberfläche (Port 8443) – oder direkt per CLI:

# Domain mit maximal 50 Benutzern anlegen
grommunio-admin domain create -u 50 example.net

# Postfach anlegen und Passwort setzen
grommunio-admin user create max@example.net
grommunio-admin passwd max@example.net

grommunio-admin user list

11. DNS für AutoDiscover und Zustellbarkeit

EintragTypWert
example.netMX10 mail.example.net.
autodiscover.example.netCNAMEmail.example.net.
_autodiscover._tcp.example.netSRV0 0 443 mail.example.net.
example.netTXT (SPF)v=spf1 mx -all
_dmarc.example.netTXTv=DMARC1; p=quarantine; rua=mailto:postmaster@example.net

Außerdem beim Hoster einen PTR-Eintrag (Reverse DNS) für die Server-IP auf mail.example.net setzen lassen – ohne ihn landen Mails bei großen Anbietern schnell im Spam. DKIM-Signaturen richtet man am besten mit einem Spamfilter wie rspamd ein (eigenes Thema).

12. Testen

systemctl --failed                       # sollte leer sein
ss -tlnp | grep -E ':(25|443|993|995|8443|10443)\b'
journalctl -u gromox-http -n 50 --no-pager

# Zertifikatskette prüfen (muss "Verify return code: 0" zeigen)
openssl s_client -connect mail.example.net:443 -servername mail.example.net </dev/null 2>/dev/null | grep "Verify return"
openssl s_client -connect mail.example.net:25 -starttls smtp </dev/null 2>/dev/null | grep "Verify return"

Danach in Outlook ein Konto mit max@example.net hinzufügen – AutoDiscover sollte den Server selbst finden. Auf dem Smartphone ein „Exchange“-Konto anlegen.

Typische Stolperfallen

  • IPv6 deaktiviert → Gromox-Dienste starten nicht oder lauschen nicht. ::1 muss vorhanden sein.
  • Standard-Seite von nginx noch aktiv → grommunio ist unter 443 nicht erreichbar.
  • Nur Zertifikat statt Kette eingebunden → Outlook/Handy melden Zertifikatsfehler, der Browser nicht.
  • Rechte am Schlüssel → gromox-http läuft nicht als root und muss server.key lesen dürfen (Gruppe gromox).
  • Abhängigkeitsfehler bei apt → Status der Debian-13-Pakete im grommunio-Forum prüfen.

Backup nicht vergessen

# Datenbank
mariadb-dump --single-transaction grommunio > /root/grommunio-$(date +%F).sql
# Postfächer und Konfiguration
tar czf /root/gromox-$(date +%F).tar.gz /var/lib/gromox /etc/gromox /etc/grommunio-admin-api

Stand: November 2026, zusammengestellt nach der offiziellen grommunio-Dokumentation. Paketnamen und Debian-13-Unterstützung können sich ändern – vor dem Einsatz die aktuelle Anleitung prüfen und zuerst auf einer Testmaschine installieren.

Quellen: grommunio – Manuelle Installation · grommunio CLI-Referenz · Gromox imap(8gx) · grommunio-setup für Debian 13 · Forum: Debian 13

#grommunio#gromox#debian#debian-13#trixie#mailserver#groupware#exchange#outlook

Mehr aus Grommunio