Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi2:postfix-dovecot-imapd

Dies ist eine alte Version des Dokuments!


postfix und dovecot-imapd verbinden

Vorraussetzung:

Speicherformat für Mails

Mails im Maildir-Format speichern: 1)

/etc/dovecot/conf.d/10-mail.conf
…
mail_location = maildir:~/Maildir
…

prüfen

doveconf mail_location

Einfach: Postfix und dovecot speichern beide in Maildir

dovecot Konfiguration

Postfix Konfiguration

/etc/postfix/main.cf
…
home_mailbox = Maildir/
mailbox_command =
…

prüfen

postconf home_mailbox
postconf mailbox_command

Testen mit mutt

~/.muttrc
set mbox_type=Maildir
set folder="~/Maildir/"
set mbox="~/Maildir/"
set spoolfile="~/Maildir/"

Performanter: per LMTP von Postfix zu Dovecot

Pakete

Debian (ab 7): dovecot-lmtpd

dovecot Konfiguration

Debian (ab 8):

/etc/dovecot/conf.d/10-auth.conf
…
auth_username_format = %Ln
…

2)

doveconf auth_username_format

openSuSE 12.1, debian (ab 8):

/etc/dovecot/conf.d/10-master.conf
…
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:

ls -l /var/spool/postfix/private/dovecot-lmtp

Postfix Konfiguration

postconf -e 'mailbox_transport = lmtp:unix:private/dovecot-lmtp'

Trusted Networks

Zu Testzwecken das eigene Netz als mynetworks eintragen, also statt /32 ein /24

postconf mynetworks
mynetworks='127.0.0.1/32 192.168.225.102/32 [::1]/128 [fe80::5054:ff:fe00:102]/12'
postconf mynetworks='127.0.0.1/32 192.168.225.0/24 [::1]/128 [fe80::5054:ff:fe00:102]/12'

Dokumentation

1)
alternative Möglichkeiten: https://wiki.dovecot.org/MailboxFormat
2)
auth_username_format ist essentiell, weil 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/
lpi2/postfix-dovecot-imapd.1701956035.txt.gz · Zuletzt geändert: 2023/12/07 13:33 von ingo_wichmann