Postfix führt die Zustellung lokal durch, statt über Dovecot LMTP

Postfix führt die Zustellung lokal durch, statt über Dovecot LMTP

Sieve läuft auf meinem System nicht und der Grund dafür scheint darin zu liegen, dass Postfix die Zustellung über das lokale Maildir vornimmt, statt über Dovecot.

Details: System:Ubuntu 20.10

/etc/postfix/main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = $myhostname, example.com, localhost
myhostname = mail.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 <IP ADDRESSES>
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = _
relayhost =
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_pipelining reject_non_fqdn_recipient reject_unknown_recipient_domain reject_unauth_destination reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = mail.example.com
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_cert_file = /etc/postfix/ssl/mailserver.crt
smtpd_tls_key_file = /etc/postfix/ssl/mailserver.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = hash:/etc/postfix/virtual

virtual_transport = lmtp:unix:private/dovecot-lmtp
#mailbox_transport = lmtp:unix:private/dovecot-lmtp
#local_transport = lmtp:unix:private/dovecot-lmtp

Als ich anstelle von eine der oben kommentierten Optionen ausprobiert habe virtual_transport, konnten E-Mails nicht mehr zugestellt werden.

/etc/dovecot/dovecot.conf:

!include_try /usr/share/dovecot/protocols.d/*.protocol
!include conf.d/*.conf
!include_try local.conf
protocols = lmtp imap

/etc/dovecot/conf.d/10-master.conf (Auszug):

service lmtp {
 unix_listener /var/spool/postfix/private/dovecot-lmtp {
   group = postfix
   mode = 0600
   user = postfix
  }
}

/etc/postfix/virtual:

MAILER-DAEMON   admin
postmaster      admin
support         admin
abuse           admin
logcheck        admin
root            admin

example.com         xxxxx
[email protected]   user1
[email protected]  user1
[email protected]  user1
[email protected]   user2

Antwort1

Du hast Postfix gesagtWieum Post für virtualBestimmungsorte nach Taubenschlag zu liefern.

Was Sie Postfix wahrscheinlich nicht gesagt haben:Welcheüber welche Ziele abgewickelt localund welche an weitergegeben werden sollen virtual.

So könnte beispielsweise die Definition des Transportziels localaussehen:

mydestination = example.com, localhost
virtual_alias_maps =

Die Definition eines Transportziels virtualkönnte wie folgt aussehen:

mydestination =
virtual_alias_maps = hash:/etc/postfix/virtual

Ich vermute, Sie möchten die Domäne entfernen, die über LMTP zu Dovecot&Sieve gehen soll mydestination. Es ist vollkommen in Ordnung, eine leere Domäne zu haben mydestination, z. B. wennalleEmpfangene E-Mails werden an Dovecot weitergeleitet.

verwandte Informationen