====== postfix und dovecot-imapd verbinden ====== Vorraussetzung: * [[dovecot]] * [[postfix]] ===== Speicherformat für Mails ===== Mails im Maildir-Format speichern: ((alternative Möglichkeiten: https://wiki.dovecot.org/MailboxFormat)) … mail_location = maildir:~/Maildir … === prüfen === doveconf mail_location -> gibt aus: ''mail_location = maildir:~/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 ==== [[#speicherformat_fuer_mails|siehe oben]] ==== Postfix Konfiguration ==== … home_mailbox = Maildir/ mailbox_command = … === prüfen === postconf home_mailbox postconf mailbox_command === Testen mit mutt === set mbox_type=Maildir set folder="~/Maildir/" set mbox="~/Maildir/" set spoolfile="~/Maildir/" ++++ ===== per LMTP von Postfix zu Dovecot ===== === Pakete === Debian (ab 7): ''dovecot-lmtpd'' ==== dovecot Konfiguration ==== Debian (ab 8): … auth_username_format = %Ln … ((''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/ )) doveconf auth_username_format -> gibt aus: ''auth_username_format = %Ln'' openSuSE 12.1, debian (ab 8): … service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { user = postfix group = postfix mode = 0660 } } … 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 ==== 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=, relay=klaus-1.lxht.de[private/dovecot-lmtp],…, status=sent'' ====== Dokumentation ====== * http://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP