Atualizei meu Exim (no Directadmin) para a versão 4.97.1. No processo, algo deu errado e agora não consigo mais enviar e-mails. Posso receber e-mail (remoto e usando LMTP com Dovecot). Também descobri esta manhã que o correio local também está funcionando bem. raiz -> exim -> pombal.
Ao usar um aplicativo de e-mail remoto, recebo (testado tanto simples quanto com login):
2024-04-15 07:51:01 plain authenticator failed for dynamic.caiway.nl ([192.168.178.2]) [xxx.xxx.xxx.xxx]: 535 Incorrect authentication data ([email protected])
2024-04-14 09:12:29 login authenticator failed for dynamic.caiway.nl ([192.168.178.2]) [xxx.xxx.xxx.xxx]: 535 Incorrect authentication data ([email protected])
Obtenho resultados diferentes ao usar a porta 25 ou a porta 587. mas os certificados estão corretos:
telnet server.example.com 25
Trying xx.xx.xx.xxx...
Connected to server.example.com.
Escape character is '^]'.
220 server.example.com ESMTP Exim 4.97.1 Mon, 15 Apr 2024 08:18:19 +0200
ehlo caiway.nl
250-server.example.com Hello dynamic.caiway.nl [xxx.xxx.xxx.xxx]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPECONNECT
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
Diz STARTTLS e AUTH PLAIN LOGIN, então isso é bom, eu acredito. Mas ao conectar através do openssl com starttls na porta 587 eu recebo:
openssl s_client -starttls smtp -connect server.example.com:587 -showcerts
CONNECTED(00000003)
nada mais, ao conectar através do openssl na porta 25 eu recebo:
openssl s_client -starttls smtp -connect server.example.com:25 -showcerts
CONNECTED(00000003)
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
verify return:1
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
verify return:1
depth=0 CN = example.com
verify return:1
Server certificate
subject=CN = example.com
issuer=C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 6202 bytes and written 434 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
250 HELP
Além disso, o EHLO na porta 587 ao usar o telnet apenas desconecta:
telnet server.example.com 587
Trying xx.xx.xx.xxx...
Connected to server.example.com.
Escape character is '^]'.
ehlo caiway.nl
Connection closed by foreign host.
alguns logs dos testes acima são como:
2024-04-15 08:19:18 TLS error on connection from dynamic.caiway.nl [xxx.xxx.xxx.xxx] (SSL_accept): (TLSv1.3)
2024-04-15 08:20:21 TLS error (SSL_read): on connection from dynamic.caiway.nl [xxx.xxx.xxx.xxx] error:0A000126:SSL routines::unexpected eof while reading
2024-04-15 08:21:07 TLS error on connection from dynamic.caiway.nl [xxx.xxx.xxx.xxx] (SSL_accept): error:0A000126:SSL routines::unexpected eof while reading
Estou meio perdido, primeiro pensei que fosse um problema de certificado. mas o openssl na porta 25 com -showcerts mostra que todos os certificados estão corretos. Exim está anunciando AUTH e STARTTLS. mas ao conectar pela porta 587 apenas desconecta.
Minha configuração do Exim mostra todos os valores corretos (eu acredito):
auth_advertise_hosts = ${if or { {eq {$received_port}{465}} {eq {$received_port}{587}} } {*}{}}
auth_advertise_hosts = ${if eq{$tls_cipher}{}{}{*}}
daemon_smtp_ports=25:587:465
tls_on_connect_ports=587:465
EDITAR ---- INFORMAÇÕES ADICIONAIS: ao executar o exim no modo de depuração com saída, recebo isso ao conectar-me a partir do cliente de e-mail para enviar um e-mail.
19:38:10 111203 login authenticator server_condition:
19:38:10 111203 $auth1 = [email protected]
19:38:10 111203 $auth2 = password
19:38:10 111203 $1 = [email protected]
19:38:10 111203 $2 = password
19:38:10 111203 ╭considering: ${perl{smtpauth}{0}}
19:38:10 111203 ╭considering: smtpauth}{0}}
19:38:10 111203 ├───────text: smtpauth
19:38:10 111203 ├considering: }{0}}
19:38:10 111203 ├──expanding: smtpauth
19:38:10 111203 ╰─────result: smtpauth
19:38:10 111203 ╭considering: 0}}
19:38:10 111203 ├───────text: 0
19:38:10 111203 ├considering: }}
19:38:10 111203 ├──expanding: 0
19:38:10 111203 ╰─────result: 0
19:38:10 111203 Starting Perl interpreter
19:38:10 111203 ├──expanding: ${perl{smtpauth}{0}}
19:38:10 111203 ╰─────result: 0
19:38:10 111203 expanded string: 0
19:38:10 111203 ╭considering: $1
19:38:10 111203 ├──────value: [email protected]
19:38:10 111203 ╰──(tainted)
19:38:10 111203 ├──expanding: $1
19:38:10 111203 ╰─────result: [email protected]
19:38:10 111203 ╰──(tainted)
19:38:10 111203 SMTP>> 535 Incorrect authentication data
Ainda não há informações do mundo real aqui.
Algum conselho? Estou meio perdido e não sei por onde começar/procurar.
ok, encontrei o problema..
aparentemente, os métodos de autenticação Login e Plain configurados não funcionam mais.
que vi na saída de depuração entre os autenticadores era pombal. então isso me fez pensar e encontrei este artigo: Exim e Dovecot SASL
mudando isso e funcionou perfeitamente.