O problema foi resolvido reiniciando o servidor MySQL:
systemctl restart mysql postfix
Apenas pegue o marcador e atualize para o Debian Stretch. Tudo estava funcionando bem por meses, se não anos antes.
Eu segui a postagem do blog no link para corrija dois problemas que encontrei inicialmente.
Depois que tudo parecia estar funcionando, não me preocupei em enviar uma mensagem de teste.
Agora que eu descobri, não consigo enviar nem receber e-mails.
Conexões apenas timeout sem erro, o log de email (mesmo com saída de depuração) não revela nada útil.
Enviar um email produz as seguintes linhas de log entre várias outras menos relevantes:
postfix/smtpd[16428]: connect from unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]
...
postfix/smtpd[16428]: report connect to all milters
postfix/smtpd[16428]: milter_macro_lookup: "i"
postfix/smtpd[16428]: milter_macro_lookup: "j"
postfix/smtpd[16428]: milter_macro_lookup: result "domain.com"
postfix/smtpd[16428]: milter_macro_lookup: "{daemon_name}"
postfix/smtpd[16428]: milter_macro_lookup: result "domain.com"
postfix/smtpd[16428]: milter_macro_lookup: "v"
postfix/smtpd[16428]: milter_macro_lookup: result "Postfix 3.1.8"
postfix/smtpd[16428]: milter_macro_lookup: "{if_name}"
postfix/smtpd[16428]: milter_macro_lookup: "_"
postfix/smtpd[16428]: milter_macro_lookup: result "unknown [2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]"
...
postfix/smtpd[16428]: milter8_conn_event: milter unix:/spamass/spamass.sock: connect unknown/2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64
postfix/smtpd[16428]: event: SMFIC_CONNECT; macros: j=domain.com {daemon_name}=domain.com v=Postfix 3.1.8 _=unknown [2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]
postfix/smtpd[16428]: reply: SMFIR_CONTINUE data 0 bytes
...
postfix/smtpd[16428]: milter8_conn_event: milter local:/opendkim/opendkim.sock: connect unknown/2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64
postfix/smtpd[16428]: event: SMFIC_CONNECT; macros: j=domain.com {daemon_name}=domain.com v=Postfix 3.1.8 _=unknown [2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]
postfix/smtpd[16428]: reply: SMFIR_CONTINUE data 0 bytes
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 220 domain.com ESMTP Postfix (Debian/GNU)
postfix/smtpd[16428]: < unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: EHLO [IPv6:2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]
...
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-domain.com
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-PIPELINING
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-SIZE 52428800
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-VRFY
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-ETRN
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-STARTTLS
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-AUTH=PLAIN LOGIN CRAM-MD5 DIGEST-MD5
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-ENHANCEDSTATUSCODES
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-8BITMIME
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250 DSN
postfix/smtpd[16428]: < unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: STARTTLS
...
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 220 2.0.0 Ready to start TLS
...
postfix/smtpd[16428]: Anonymous TLS connection established from unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
...
postfix/smtpd[16428]: < unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: EHLO [IPv6:2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64
...
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-domain.com
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-PIPELINING
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-SIZE 52428800
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-VRFY
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-ETRN
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-AUTH=PLAIN LOGIN CRAM-MD5 DIGEST-MD5
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-ENHANCEDSTATUSCODES
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250-8BITMIME
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 250 DSN
postfix/smtpd[16428]: < unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: AUTH PLAIN xxxx=
...
postfix/smtpd[16428]: > unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: 235 2.7.0 Authentication successful
postfix/smtpd[16428]: < unknown[2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64]: MAIL FROM:<[email protected]> BODY=8BITMIME SIZE=5184
e então é isso. Ele simplesmente pára de fazer qualquer coisa e o Thunderbird eventualmente reclama que a ação expirou, mas o registro de e-mail não percebe (nenhuma linha sobre uma conexão perdida ou algo parecido).
Se eu aumentar ainda mais a verbosidade, a última coisa que realmente acontece é:
postfix/smtpd[30091]: vstream_fflush_some: fd 23 flush 42
Se eu adicionar -v
a quase tudo em master.cf
, a última coisa que acontece é:
postfix/trivial-rewrite[18140]: dict_mysql_get_active: attempting to connect to host 127.0.0.1
postfix/trivial-rewrite[18140]: dict_mysql: successful connection to host 127.0.0.1
Aqui está meu postconf -n
:
alias_maps = $alias_database
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
debug_peer_level = 9999
debug_peer_list = [2a02:xxxx:xxxx:9880:b5f0:b045:109d:4b64], otherdomain.net
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 20
dovecot_destination_recipient_limit = 1
inet_interfaces = all
local_destination_concurrency_limit = 2
local_transport = local
mailbox_size_limit = 0
message_size_limit = 52428800
mydestination = localhost
mydomain = domain.com
myhostname = domain.com
mynetworks = 127.0.0.0/8, 192.168.0.0/16
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_client_access hash:/etc/postfix/rbl_override, reject_unauth_destination, reject_unauth_pipelining, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_hostname
smtpd_reject_unlisted_sender = yes
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, check_client_access hash:/etc/postfix/rbl_override reject_unauth_destination, reject_unauth_pipelining, reject_non_fqdn_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unknown_sender_domain, reject_unknown_helo_hostname
smtpd_tls_cert_file = /etc/letsencrypt/live/domain.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/domain.com/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
tls_high_cipherlist = AES128+EECDH:AES128+EDH:AES256-SHA256:HIGH:!aNULL:!eNULL:!DES:!MD5:!PSK:!RC4
tls_random_source = dev:/dev/urandom
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/kunden/mail/
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_mailbox_limit = 0
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:2000
Eu não sei mais o que tentar ou olhar, tudo que eu vejo parece bom para mim.
Minha pilha é:
Como faço para enviar e receber e-mails novamente?
O problema foi resolvido reiniciando o servidor MySQL:
systemctl restart mysql postfix