This commit is contained in:
Andreas Knuth 2025-03-15 10:57:15 +01:00
parent 4149655432
commit 68dc2ae779
3 changed files with 24 additions and 2 deletions

View File

@ -10,7 +10,8 @@ info_log_path = /var/log/dovecot-info.log
debug_log_path = /var/log/dovecot-debug.log
# Mail-Location
mail_location = maildir:/var/mail/%u
# Für Benutzer mit @ in der E-Mail-Adresse
mail_location = maildir:/var/mail/%d/%n
# Authentifizierung
auth_mechanisms = plain login

View File

@ -2,4 +2,4 @@
# Für Plaintext-Passwörter
user1:{PLAIN}geheim:1000:1000::/var/mail/user1:/bin/false
bizmatch.net:{PLAIN}passwort123:1001:1000::/var/mail/bizmatch.net:/bin/false
info@bizmatch.net:{PLAIN}passwort123:1001:1000::/var/mail/info@bizmatch.net:/bin/false
info\@bizmatch.net:{PLAIN}passwort123:1001:1000::/var/mail/bizmatch.net/info:/bin/false

View File

@ -0,0 +1,21 @@
#!/bin/bash
# Dieses Skript richtet die Verzeichnisstruktur und Berechtigungen für Dovecot ein
# Erstellen der Verzeichnisstruktur
mkdir -p /var/mail/domains/bizmatch.net/info
mkdir -p /var/mail/user1
mkdir -p /var/mail/user2
# Festlegen der richtigen Besitzer und Berechtigungen
chown -R 1001:1000 /var/mail/domains/bizmatch.net/info
chown -R 1000:1000 /var/mail/user1
chown -R 1001:1000 /var/mail/user2
# Setzen der Berechtigungen (wichtig für den dovecot Zugriff)
chmod -R 0770 /var/mail
# Ausgabe zur Bestätigung
echo "Verzeichnisse und Berechtigungen wurden korrekt eingerichtet."
echo "Verzeichnisstruktur:"
ls -la /var/mail
ls -la /var/mail/domains/bizmatch.net