Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
lpi2:dovecot-virtual-domains [2014/02/26 23:36] ingo_wichmann |
lpi2:dovecot-virtual-domains [2022/12/18 07:48] ingo_wichmann [Testen] |
||
---|---|---|---|
Zeile 4: | Zeile 4: | ||
Voraussetzung: [[dovecot-imapd]] | Voraussetzung: [[dovecot-imapd]] | ||
- | ''/etc/dovecot/dovecot.conf'' : | + | Benutzer vmail und Mailverzeichnis anlegen: |
+ | mkdir -p /srv/vmail/example.com/home | ||
+ | useradd -r -U -s /bin/false -d /srv/vmail vmail | ||
+ | chown -R vmail:vmail /srv/vmail/example.com | ||
+ | |||
+ | Dovecot konfigurieren: | ||
+ | |||
+ | ''/etc/dovecot/local.conf'' : | ||
<file> | <file> | ||
mail_location = maildir:/srv/vmail/%d/home/%n/Maildir | mail_location = maildir:/srv/vmail/%d/home/%n/Maildir | ||
+ | auth_username_format = %Lu | ||
userdb { | userdb { | ||
args = username_format=%n /srv/vmail/%d/passwd | args = username_format=%n /srv/vmail/%d/passwd | ||
Zeile 19: | Zeile 27: | ||
</file> | </file> | ||
- | mkdir -p /srv/vmail/example.com/home | + | Beispiel-Benutzer anlegen: ((https://doc.dovecot.org/configuration_manual/authentication/password_schemes/#authentication-password-schemes)) |
doveadm pw -l | doveadm pw -l | ||
- | doveadm pw -s SSHA256 | + | doveadm pw -s BLF-CRYPT |
''/srv/vmail/example.com/passwd'' : | ''/srv/vmail/example.com/passwd'' : | ||
- | user1:{SSHA256}NZMbbjQl2IsI8Qurnfgl2XjTxD/8eNf4IYD+AdiikArZ+WZI: | + | <file> |
+ | user1:{BLF-CRYPT}$2y$05$XF8X/y47o1sfXTiwX5JkzOn0uGvZw9QCtHOKRinCsMc.rtAElVHOG | ||
+ | user2:{SSHA256}NZMbbjQl2IsI8Qurnfgl2XjTxD/8eNf4IYD+AdiikArZ+WZI | ||
+ | </file> | ||
+ | |||
+ | ====== Testen ====== | ||
+ | Kennt dovecot die Benutzer? | ||
+ | doveadm user '*' | ||
+ | doveadm user user1@example.com | ||
+ | |||
+ | Funktioniert die Authentifizierung? | ||
+ | doveadm auth test user1@example.com | ||
+ | |||
+ | Kann man sich lokal anmelden (ohne TLS geht das per default nicht): | ||
+ | netcat -v localhost 143 | ||
+ | . login user1@example.com xxx | ||