Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi2:postfix-dovecot-imapd

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
lpi2:postfix-dovecot-imapd [2019/10/30 10:47]
ingo_wichmann
lpi2:postfix-dovecot-imapd [2024/08/10 09:09] (aktuell)
Zeile 1: Zeile 1:
 ====== postfix und dovecot-imapd verbinden ====== ====== postfix und dovecot-imapd verbinden ======
-Vorraussetzung:​ [[postfix]]+Vorraussetzung:​ 
 +  * [[dovecot]]  
 +  * [[postfix]]
  
 ===== Speicherformat für Mails ===== ===== Speicherformat für Mails =====
 Mails im Maildir-Format speichern: ((alternative Möglichkeiten:​ https://​wiki.dovecot.org/​MailboxFormat)) Mails im Maildir-Format speichern: ((alternative Möglichkeiten:​ https://​wiki.dovecot.org/​MailboxFormat))
  
-<file txt /​etc/​dovecot/​conf.d/​10-mail.conf>+<file txt /​etc/​dovecot/​local.conf>
  
 mail_location = maildir:​~/​Maildir mail_location = maildir:​~/​Maildir
Zeile 13: Zeile 15:
 === prüfen === === prüfen ===
   doveconf mail_location   doveconf mail_location
 +-> gibt aus: ''​mail_location = maildir:​~/​Maildir''​
  
-===== Einfach: ​Postfix und dovecot speichern beide in Maildir =====+===== Postfix und dovecot speichern beide in Maildir ===== 
 +++++ Postfix und dovecot speichern beide in Maildir| 
 +Nachteile:​ 
 +  * langsamer, da dovecot keine Indizes anlegen kann 
 +  * dovecot bekommt nicht sofort mit, wenn neue Mails ankommen und kann Clients nicht informieren
 ==== dovecot Konfiguration ==== ==== dovecot Konfiguration ====
 [[#​speicherformat_fuer_mails|siehe oben]] [[#​speicherformat_fuer_mails|siehe oben]]
Zeile 37: Zeile 44:
 </​file>​ </​file>​
  
-===== Performanter: ​per LMTP von Postfix zu Dovecot =====+++++ 
 +===== per LMTP von Postfix zu Dovecot =====
 === Pakete === === Pakete ===
 Debian (ab 7): ''​dovecot-lmtpd''​ Debian (ab 7): ''​dovecot-lmtpd''​
Zeile 43: Zeile 51:
 ==== dovecot Konfiguration ==== ==== dovecot Konfiguration ====
 Debian (ab 8): Debian (ab 8):
-<​file ​raw /​etc/​dovecot/​conf.d/​10-auth.conf>+<​file ​txt /​etc/​dovecot/​local.conf>
  
 auth_username_format = %Ln auth_username_format = %Ln
  
-</​file>​ +</​file>​((''​auth_username_format''​ ist essentiell, weil [[wpde>​LMTP]] bei der Zustellung nach diesem Verzeichnis sucht.  
-((''​auth_username_format''​ ist essentiell, weil [[wpde>​LMTP]] bei der Zustellung nach diesem Verzeichnis sucht.  +  * ''​L''​ = lowercase, email-Adresse wird in Kleinbuchstaben umgewandelt 
-* ''​L''​ = lowercase, email-Adresse wird in Kleinbuchstaben umgewandelt +  * ''​n''​ = nur Benutzername  
-* ''​n''​ = nur Benutzername  +  * ''​u''​ = komplette email-Adresse (Benutzername@domain) ​
-* ''​u''​ = komplette email-Adresse (Benutzername@domain) ​+
 Ersetzung siehe https://​doc.dovecot.org/​configuration_manual/​config_file/​config_variables/​ Ersetzung siehe https://​doc.dovecot.org/​configuration_manual/​config_file/​config_variables/​
 )) ))
 +  doveconf auth_username_format
 +-> gibt aus: ''​auth_username_format = %Ln''​
  
 openSuSE 12.1, debian (ab 8):  openSuSE 12.1, debian (ab 8): 
-<file raw /​etc/​dovecot/​conf.d/​10-master.conf>+<file raw /​etc/​dovecot/​local.conf>
  
 service lmtp { service lmtp {
   unix_listener /​var/​spool/​postfix/​private/​dovecot-lmtp {   unix_listener /​var/​spool/​postfix/​private/​dovecot-lmtp {
 +    user = postfix
     group = postfix     group = postfix
     mode = 0660     mode = 0660
-    user = postfix 
   }   }
- 
 } }
 +
 </​file>​ </​file>​
 +
 +Konfiguration prüfen:
 +  doveconf protocols
 +  doveconf -n
 +
 +Dienst neu starten:
 +  systemctl restart dovecot.service
 +
 +Prüfen, ob dovecot den Socket angelegt hat:
 +  namei -l /​var/​spool/​postfix/​private/​dovecot-lmtp
 +  lsof /​var/​spool/​postfix/​private/​dovecot-lmtp
  
 ==== Postfix Konfiguration ==== ==== Postfix Konfiguration ====
   postconf -e '​mailbox_transport = lmtp:​unix:​private/​dovecot-lmtp'​   postconf -e '​mailbox_transport = lmtp:​unix:​private/​dovecot-lmtp'​
 +
 +=== Testen ===
 +Auf dem Client:
 +  swaks -f test@lxht.de -t testuser@klaus-1.lxht.de -s klaus-1.lxht.de
 +-> ''​250 2.0.0 Ok: queued as B0EF53FA42''​
 +
 +Auf dem Server:
 +  journalctl -g B0EF53FA42
 +-> ''​postfix/​lmtp[…]:​ B0EF53FA42: to=<​testuser@klaus-1.lxht.de>,​ relay=klaus-1.lxht.de[private/​dovecot-lmtp],​…,​ status=sent''​
  
 ====== Dokumentation ====== ====== Dokumentation ======
   * http://​wiki2.dovecot.org/​HowTo/​PostfixDovecotLMTP   * http://​wiki2.dovecot.org/​HowTo/​PostfixDovecotLMTP
lpi2/postfix-dovecot-imapd.1572432433.txt.gz · Zuletzt geändert: 2019/10/30 10:47 von ingo_wichmann