Nach Serverumzug Postfix/Dovecot Probleme

Nach Serverumzug Postfix/Dovecot Probleme

Ich bin von einem Serveranbieter zu einem anderen gewechselt und habe alle meine Domains und Dienste portiert. Auf den ersten Blick lief alles reibungslos, aber jetzt habe ich festgestellt, dass ich einige Probleme mit Dovecot/Postfix habe.

Erstes Problem: Im Webinterface (Roundcube) werden mir alle alten Mails mit dem richtigen Zeitstempel angezeigt, beim Abrufen über einen Mailclient wird mir als Datum immer der 5. Mai 2015 (einen Tag nach dem Serverumzug) angezeigt.

Zweites Problem: Ich kann anscheinend keine E-Mails über IMAP senden und empfangen. Ich erhalte keine Fehlermeldung (ich werde die Protokolle später in diesem Beitrag veröffentlichen), es scheint, als ob die E-Mail gesendet wurde.

Drittes Problem: Die Protokolldatei ist mit diesen Fehlern vollgespammt: warning: 9C42A2408E2: virtual_alias_maps map lookup problem for root@dirty-harry -- message not accepted, try again later(Dirty-Harry ist der Name meines Servers!).

Ich habe alle diese Probleme gegoogelt und meine Konfigurationen noch einmal durchgesehen, kann jedoch nichts finden, was mein Problem lösen würde.

Hier sind die Konfigurationen:

main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

append_dot_mydomain = no

readme_directory = no

smtpd_tls_cert_file=/etc/postfix/sslcert/mailserver.crt
smtpd_tls_key_file=/etc/postfix/sslcert/mailserver.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = dirty-harry
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = static.136.90.47.78.clients.your-server.de, dirty-harry, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

disable_vrfy_command = yes

smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth_dovecot
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes

proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps

smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf

smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
        reject_unknown_sender_domain

smtpd_recipient_restrictions = permit_sasl_authenticated
        permit_mynetworks
        reject_unauth_destination


virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 112400000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 104
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

master.cf

smtp      inet  n       -       -       -       -       smtpd
smtps     inet  n       -       -       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
#628       inet  n       -       -       -       -       qmqpd
pickup    unix  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix    -    n    n    -    2    pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}

dovecot.conf

protocols = imap imaps pop3 pop3s

log_timestamp = "%Y-%m-%d %H:%M:%S "

ssl_cert_file = /etc/postfix/sslcert/mailserver.crt
ssl_key_file = /etc/postfix/sslcert/mailserver.key

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  postmaster_address = [email protected]
  auth_socket_path = /var/run/dovecot/auth-master
}

auth default {
  mechanisms = plain login

  passdb sql {
    args = /etc/dovecot/dovecot-mysql.conf
  }

  userdb sql {
    # Path for SQL configuration file, see /etc/dovecot/dovecot-sql.conf for example
    args = /etc/dovecot/dovecot-mysql.conf
  }

  user = root

  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0600
      user = vmail
    }
    client {
      path = /var/spool/postfix/private/auth_dovecot
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}

E-Mail-Protokoll(Im Wesentlichen werden diese Nachrichten jede Sekunde wiederholt)

May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B46BD2416D6: message has been queued for 6 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B46BD2416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B46BD2416D6: message-id=<20150518042448.B46BD2416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B46BD2416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B4B262416D6: message has been queued for 2 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B4B262416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B4B262416D6: message-id=<20150518042448.B4B262416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B4B262416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B4F932416D6: message has been queued for 8 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B4F932416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B4F932416D6: message-id=<20150518042448.B4F932416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B4F932416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B53FA2416D6: message has been queued for 3 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B53FA2416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B53FA2416D6: message-id=<20150518042448.B53FA2416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B53FA2416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later

mail.err und mail.warn sind leer.

Ich wäre sehr dankbar, wenn sich das jemand anschauen könnte! Danke!

Antwort1

Ich habe jetzt bei den Jungs hier von Server Fault die Lösung gefunden.

Es gab zwei Probleme:

Warum konnte ich keine E-Mails empfangen?

Ich habe den Server migriert und die DNS-A-Einträge aktualisiert, aber vergessen, die MX-Einträge zu aktualisieren, sodass der alte Server weiterhin E-Mails empfing, obwohl Postfix und Dovecot noch liefen. Durch die Aktualisierung des MX-Eintrags wurde das Problem gelöst.

Warum konnte ich keine E-Mails senden und das Protokoll wurde mit Spam überflutet?

Ich hatte einen Tippfehler im Postfix-Datenbanknamen. Durch die Korrektur wurde das Problem behoben.

verwandte Informationen