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:23]
ingo_wichmann [Dovecot Maildir Konfiguration]
lpi2:postfix-dovecot-imapd [2025/08/30 09:57] (aktuell)
Zeile 1: Zeile 1:
-====== postfix und dovecot-imapd verbinden ====== +====== postfix und dovecot-imapd ​mit LMTP verbinden ====== 
-Vorraussetzung: [[postfix]]+Anleitung für ältere Dovecot-Versionen (bis 2.3): [[postfix-dovecot-imapd-2-3]]
  
-===== EinfachMaildir ​===== +Vorraussetzung:​ 
-==== Dovecot Maildir Konfiguration ​==== +  * [[dovecot]] ( Paket ''​dovecot-imapd''​ Version 2.4 soll installiert sein ) 
-<file txt /​etc/​dovecot/​conf.d/​10-mail.conf>+  * [[postfix]] ( Paket ''​postfix''​ soll installiert sein ) 
 + 
 +=== Pakete ​==
 +Debian''​dovecot-lmtpd''​ 
 + 
 +===== Speicherformat für Mails ===== 
 +Mails im Maildir-Format speichern: ((Maildir ist nicht das von dovecot bevorzugte Format. Alternative Möglichkeiten:​ https://​doc.dovecot.org/​2.4.1/​core/​config/​mailbox_formats/​maildir.html#​maildir-mailbox-format)) 
 + 
 +<file txt /​etc/​dovecot/​local.conf>
  
-mail_location ​= maildir:~/Maildir+mail_driver ​= maildir 
 +mail_path = %{home}/Maildir 
 +mail_inbox_path = . 
  
 </​file>​ </​file>​
  
-  service dovecot reload 
 === prüfen === === prüfen ===
-  doveconf ​mail_location+  doveconf ​mail_driver 
 +  doveconf mail_path 
 +  doveconf mail_inbox_path
  
-==== Postfix ​Maildir Konfiguration ​==== +===== per LMTP von Postfix ​zu Dovecot ​===== 
- +==== dovecot Konfiguration ==== 
-''/​etc/​postfix/​main.cf''​ : ( Debian ab 5.0, openSuSE 12.1 ) +<file txt /etc/​dovecot/​local.conf
-<​file>​ +… 
-home_mailbox ​Maildir/ +#​auth_username_format ​%{user | username | lower } # already ​set similar in /etc/dovecot/conf.d/20-lmtp.conf,​ but for lmtp only? 
-mailbox_command ​= +
-</​file>​ +
- +
-=== Testen mit mutt === +
-<file txt ~/.muttrc+
-set mbox_type=Maildir +
-set folder="​~/Maildir/+
-set mbox="​~/Maildir/" +
-set spoolfile="​~/​Maildir/"​+
 </​file>​ </​file>​
  
-===== Performanter:​ LMTP ===== +<file raw /​etc/​dovecot/​local.conf> 
-=== Pakete === +
-Debian (7): ''​dovecot-lmtpd''​ +
- +
-==== Dovecot 2.x ==== +
-( Debian 8 ) +
-<file raw /​etc/​dovecot/​conf.d/​10-auth.conf> +
-auth_username_format = %Ln +
-</​file>​ +
-((''​auth_username_format''​ ist essentiell, weil [[wpde>​LMTP]] bei der Zustellung nach diesem Verzeichnis sucht)) +
- +
-( openSuSE 12.1, debian 8 )\\ +
-<file raw /​etc/​dovecot/​conf.d/​10-master.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>​
  
-( openSUSE Leap 42.1, debian 8 )\\ +Konfiguration prüfen: 
-Existiert noch kein ''​~./Maildir''​, schlägt die storage auto detection von dovecot fehl. +  doveconf protocols 
-<file raw /​etc/​dovecot/​conf.d/​10-mail.conf>​ +-> gibt u.a. aus: ''​lmtp''​ 
-mail_location = maildir:​~/​Maildir +  ​doveconf ​-n
-</​file>​+
  
-==== Postfix ====+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 
 +-> ''​TYPE''​ ... ''​unix''​ 
 +==== 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+  * https://doc.dovecot.org/​2.4.1/core/​config/​delivery/​lmtp.html#​lmtp-server
lpi2/postfix-dovecot-imapd.1572430981.txt.gz · Zuletzt geändert: 2019/10/30 10:23 von ingo_wichmann