Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


fortgeschrittene: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
fortgeschrittene:postfix-dovecot-imapd [2022/05/20 09:15]
ingo_wichmann [dovecot Konfiguration]
fortgeschrittene:postfix-dovecot-imapd [2025/08/30 09:57] (aktuell)
ingo_wichmann
Zeile 1: Zeile 1:
-====== postfix und dovecot-imapd verbinden ======+====== postfix und dovecot-imapd ​mit LMTP verbinden ====== 
 +Anleitung für ältere Dovecot-Versionen (bis 2.3): [[postfix-dovecot-imapd-2-3]] 
 Vorraussetzung:​ Vorraussetzung:​
-  * [[dovecot]]  +  * [[dovecot]] ​( Paket ''​dovecot-imapd''​ Version 2.4 soll installiert sein ) 
-  * [[postfix]]+  * [[postfix]] ​( Paket ''​postfix''​ soll installiert sein ) 
 + 
 +=== Pakete === 
 +Debian: ''​dovecot-lmtpd''​
  
 ===== 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: ((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/​conf.d/​10-mail.conf>+<file txt /​etc/​dovecot/​local.conf>
  
-mail_location ​= maildir:~/Maildir+mail_driver ​= maildir 
 +mail_path = %{home}/Maildir 
 +mail_inbox_path = . 
  
 </​file>​ </​file>​
  
 === prüfen === === prüfen ===
-  doveconf ​mail_location+  doveconf ​mail_driver 
 +  doveconf mail_path 
 +  doveconf mail_inbox_path
  
-===== Einfach: ​Postfix ​und dovecot speichern beide in Maildir ​=====+===== per LMTP von Postfix ​zu Dovecot ​=====
 ==== dovecot Konfiguration ==== ==== dovecot Konfiguration ====
-[[#​speicherformat_fuer_mails|siehe oben]] +<file txt /etc/dovecot/local.conf>
-==== Postfix Konfiguration ==== +
- +
-<file txt /etc/postfix/main.cf>+
  
-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>​ </​file>​
-=== prüfen === 
-  postconf home_mailbox 
-  postconf mailbox_command 
  
-=== Testen mit mutt === +<file raw /​etc/​dovecot/​local.conf>
-<file txt ~/​.muttrc>​ +
-set mbox_type=Maildir +
-set folder="​~/​Maildir/"​ +
-set mbox="​~/​Maildir/"​ +
-set spoolfile="​~/​Maildir/"​ +
-</​file>​ +
- +
-===== Performanter:​ per LMTP von Postfix zu Dovecot ===== +
-=== Pakete === +
-Debian (ab 7): ''​dovecot-lmtpd''​ +
- +
-==== dovecot Konfiguration ==== +
-Debian (ab 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.  +
-* ''​L''​ = lowercase, email-Adresse wird in Kleinbuchstaben umgewandelt +
-* ''​n''​ = nur Benutzername  +
-* ''​u''​ = komplette email-Adresse (Benutzername@domain)  +
-Ersetzung siehe https://​doc.dovecot.org/​configuration_manual/​config_file/​config_variables/​ +
-)) +
- +
-openSuSE 12.1, debian (ab 8):  +
-<file raw /​etc/​dovecot/​conf.d/​10-master.conf>+
  
 service lmtp { service lmtp {
Zeile 66: Zeile 41:
     mode = 0660     mode = 0660
   }   }
- 
 } }
 +
 </​file>​ </​file>​
  
 Konfiguration prüfen: Konfiguration prüfen:
-  doveconf -n -m lmtp+  doveconf ​protocols 
 +-> gibt u.a. aus: ''​lmtp''​ 
 +  doveconf -n
  
 Dienst neu starten: Dienst neu starten:
-  ​service dovecot ​restart+  ​systemctl ​restart ​dovecot.service
  
 Prüfen, ob dovecot den Socket angelegt hat: Prüfen, ob dovecot den Socket angelegt hat:
-  ​ls -l /​var/​spool/​postfix/​private/​dovecot-lmtp +  ​namei -l /​var/​spool/​postfix/​private/​dovecot-lmtp 
 +  lsof /​var/​spool/​postfix/​private/​dovecot-lmtp 
 +-> ''​TYPE''​ ... ''​unix''​
 ==== 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+  * https://doc.dovecot.org/​2.4.1/core/​config/​delivery/​lmtp.html#​lmtp-server
fortgeschrittene/postfix-dovecot-imapd.1653038124.txt.gz · Zuletzt geändert: 2022/05/20 09:15 von ingo_wichmann