dovecot_install
Dies ist eine alte Version des Dokuments!
Dovecot installieren und konfigurieren
root@dovecot:~# uname -a
Linux dovecot 5.15.83-1-pve #1 SMP PVE 5.15.83-1 (2022-12-15T00:00Z) x86_64 GNU/Linux
# apt install dovecot-core dovecot-ldap dovecot-managesieved dovecot-sieve dovecot-imapd dovecot-antispam
# vi /etc/dovecot/dovecot-ldap.conf.ext
hosts = 2a02:8106:4:1800:cc20:a8ff:fe90:c2a0 base = ou=user,dc=grml,dc=de ldap_version = 3 user_attrs = =user=%{ldap:uid} user_filter = (&(objectclass=inetOrgPerson)(|(uid=%n)(mail=%u))) pass_attrs = uid=user, userPassword=password pass_filter = (&(objectclass=inetOrgPerson)(uid=%u)) auth_bind = yes iterate_attrs = mail=user iterate_filter = (objectclass=inetOrgPerson) default_pass_scheme = SSHA
# vi /etc/dovecot/conf.d/10-auth.conf
[...] auth_mechanisms = plain login #!include auth-system.conf.ext !include auth-ldap.conf.ext [...]
# vi /etc/dovecot/conf.d/10-ssl.conf
[...] ssl = required ssl_cert = </opt/certs/grml.de/fullchain.cer ssl_key = </opt/certs/grml.de/grml.de.key ssl_dh = </etc/dovecot/dh.pem ssl_min_protocol = TLSv1.2 ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 ssl_prefer_server_ciphers = no [...]
# openssl dhparam -out /etc/dovecot/dh.pem 4096
# doveadm user robin
field value uid gid home mail mbox:~/mail:INBOX=/var/mail/robin
# doveadm auth test robin P@ssw0rd
passdb: robin auth succeeded extra fields: user=robin
# vi /etc/dovecot/conf.d/10-mail.conf
mail_uid = vmail mail_gid = vmail mail_privileged_group = vmail mail_home = /home/vmail/mailboxes/%n mail_location = maildir:~/mail:LAYOUT=fs namespace inbox { inbox = yes mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } }
# useradd vmail
# doveadm user robin
field value uid vmail gid vmail home /home/vmail/mailboxes/robin mail maildir:~/mail:LAYOUT=fs
# vi /etc/dovecot/conf.d/10-master.conf
[...] service lmtp { inet_listener lmtp { # Avoid making LMTP visible for the entire internet address = 2a02:8106:4:1800:cc9f:11ff:fe0a:624f port = 24 } user = vmail } [...] service auth { unix_listener auth-userdb { #mode = 0666 #user = #group = } inet_listener { port = 234 } } [...]
# vi /etc/dovecot/conf.d/20-managesieve.conf
service managesieve-login { inet_listener sieve { port = 4190 } }
dovecot_install.1673550953.txt.gz · Zuletzt geändert: 2023/01/12 20:15 von robin