reacherhq / check-if-email-exists

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
https://reacher.email
Other
4.22k stars 324 forks source link

Connection refused using proxy #1276

Open lookandhate opened 1 year ago

lookandhate commented 1 year ago

Email Provider

yadnex.ru

What happened?

When i am trying to send request using proxy i get error like this: "smtp": { "error": { "type": "SmtpError", "message": "io: socks5 error: Error with reply: Connection refused." } }, I checked proxy and it's working

Relevant log output

[2023-02-21T15:22:18Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Checking email "sadn3sspwnz@yandex.ru"
[2023-02-21T15:22:18Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Found the following syntax validation: SyntaxDetails { address: Some(EmailAddress("sadn3sspwnz@yandex.ru")), doma
in: "yandex.ru", is_valid_syntax: true, username: "sadn3sspwnz", normalized_email: Some("sadn3sspwnz@yandex.ru"), suggestion: None }
[2023-02-21T15:22:18Z DEBUG trust_dns_proto::xfer::dns_handle] querying: yandex.ru MX
[2023-02-21T15:22:18Z DEBUG trust_dns_resolver::name_server::name_server_pool] sending request: [Query { name: Name("yandex.ru"), query_type: MX, query_class: IN }]
[2023-02-21T15:22:18Z DEBUG trust_dns_resolver::name_server::name_server] reconnecting: NameServerConfig { socket_addr: 192.168.65.7:53, protocol: Udp, tls_dns_name: None, trust_nx
_responses: false, bind_addr: None }
[2023-02-21T15:22:18Z DEBUG trust_dns_proto::xfer] enqueueing message: [Query { name: Name("yandex.ru"), query_type: MX, query_class: IN }]
[2023-02-21T15:22:18Z DEBUG trust_dns_proto::udp::udp_stream] created socket successfully
[2023-02-21T15:22:18Z DEBUG trust_dns_proto::udp::udp_client_stream] received message id: 41504
[2023-02-21T15:22:18Z DEBUG trust_dns_resolver::error] Response:41504:RD,RA:NoError:1/0/0
[2023-02-21T15:22:18Z DEBUG trust_dns_resolver::error] Response:41504:RD,RA:NoError:1/0/0
[2023-02-21T15:22:18Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Found the following MX hosts: ["10 mx.yandex.ru."]
[2023-02-21T15:22:18Z DEBUG trust_dns_proto::xfer::dns_exchange] io_stream is done, shutting down
[2023-02-21T15:22:18Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Found the following misc details: MiscDetails { is_disposable: false, is_role_account: false, gravatar_url: None
}
[2023-02-21T15:22:18Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Check SMTP [attempt=1] on [host=mx.yandex.ru.:587]
[2023-02-21T15:22:18Z INFO  fast_socks5::client] Connected @ 109.94.211.17:64105
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] Send version and method len [5, 2]
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] client auth methods supported: [0, 2]
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] Socks version (5), method chosen: 2.
[2023-02-21T15:22:18Z INFO  fast_socks5::client] Password will be used
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] Auth: [version: 1, is_success: 0]
[2023-02-21T15:22:18Z INFO  fast_socks5::client] Requesting headers `Some(Domain("mx.yandex.ru", 587))`...
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] TargetAddr::Domain
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] Bytes long version: [5, 1, 0, 3, 12, 109, 120, 46, 121, 97, 110, 100, 101, 120, 46, 114, 117, 2, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] Bytes shorted version: [5, 1, 0, 3, 12, 109, 120, 46, 121, 97, 110, 100, 101, 120, 46, 114, 117, 2, 75]
[2023-02-21T15:22:18Z DEBUG fast_socks5::client] Padding: 19
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Reply received: [version: 5, reply: 5, rsv: 0, address_type: 1]
[2023-02-21T15:22:26Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Closing [host=mx.yandex.ru:587], because of error 'Io(Custom { kind: ConnectionRefused, error: Socks5Error(ReplyE
rror(ConnectionRefused)) })'.
[2023-02-21T15:22:26Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Got result for [attempt=1] on [host=mx.yandex.ru.:587], [result=Err(SmtpError(Io(Custom { kind: ConnectionRefused
, error: Socks5Error(ReplyError(ConnectionRefused)) })))]
[2023-02-21T15:22:26Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Potential greylisting detected, retrying.
[2023-02-21T15:22:26Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Check SMTP [attempt=2] on [host=mx.yandex.ru.:587]
[2023-02-21T15:22:26Z INFO  fast_socks5::client] Connected @ 109.94.211.17:64105
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Send version and method len [5, 2]
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] client auth methods supported: [0, 2]
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Socks version (5), method chosen: 2.
[2023-02-21T15:22:26Z INFO  fast_socks5::client] Password will be used
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Auth: [version: 1, is_success: 0]
[2023-02-21T15:22:26Z INFO  fast_socks5::client] Requesting headers `Some(Domain("mx.yandex.ru", 587))`...
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] TargetAddr::Domain
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Bytes long version: [5, 1, 0, 3, 12, 109, 120, 46, 121, 97, 110, 100, 101, 120, 46, 114, 117, 2, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Bytes shorted version: [5, 1, 0, 3, 12, 109, 120, 46, 121, 97, 110, 100, 101, 120, 46, 114, 117, 2, 75]
[2023-02-21T15:22:26Z DEBUG fast_socks5::client] Padding: 19
[2023-02-21T15:22:34Z DEBUG fast_socks5::client] Reply received: [version: 5, reply: 5, rsv: 0, address_type: 1]
[2023-02-21T15:22:34Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Closing [host=mx.yandex.ru:587], because of error 'Io(Custom { kind: ConnectionRefused, error: Socks5Error(ReplyE
rror(ConnectionRefused)) })'.
[2023-02-21T15:22:34Z DEBUG reacher] [email=sadn3sspwnz@yandex.ru] Got result for [attempt=2] on [host=mx.yandex.ru.:587], [result=Err(SmtpError(Io(Custom { kind: ConnectionRefused
, error: Socks5Error(ReplyError(ConnectionRefused)) })))]
[2023-02-21T15:22:34Z DEBUG reacher] Sending error to Sentry: Smtp(SmtpError(Io(Custom { kind: ConnectionRefused, error: Socks5Error(ReplyError(ConnectionRefused)) })))
[2023-02-21T15:22:34Z INFO  reacher] 172.17.0.1:60026 "POST /v0/check_email HTTP/1.1" 200 "-" "PostmanRuntime/7.30.0" 16.543121247s
[2023-02-21T15:22:34Z DEBUG hyper::proto::h1::io] flushed 578 bytes
amaury1093 commented 1 year ago

Is the proxy yours? Is it a SOCK5 proxy? To debug this, we will need the proxy's logs.

lookandhate commented 1 year ago

It's not my proxy, I purchased it. And yes, it's socks5 proxy

amaury1093 commented 1 year ago

Unless you have access to the proxy's logs, there's unfortunately not much I can do here.

lookandhate commented 1 year ago

Okey, I'll try to get proxy logs. Do not, please, close issue yet

lookandhate commented 1 year ago

So, sadly we can't access proxy logs and moreover, we can't check are 25, 487 and so on ports open or not. Thus, there is probably proxy problem.

Nyceane commented 1 year ago

Hey @lookandhate I am running into same problem, this time with port 25 open. I've tried commercial proxy and found out keep receiving that error so I setup my own dante server on ec2 (with port 25 open), but every time reacher hits it I keep getting that eror. If I use username/password via dante then I get a

"error": { "type": "SocksError", "message": "Auth method unacceptable[255]." }

Proxy server runs as following. dante refuse to log somehow and I am trying to figure that out.

May 6 01:22:30 ip-172-31-1-178 systemd[1]: systemd-tmpfiles-clean.service: Deactivated successfully. May 6 01:22:30 ip-172-31-1-178 systemd[1]: Finished Cleanup of Temporary Directories. May 6 01:24:28 ip-172-31-1-178 danted[1242]: info: sigterm(): exiting on signal 15 May 6 01:24:28 ip-172-31-1-178 systemd[1]: Stopping SOCKS (v4 and v5) proxy daemon (danted)... May 6 01:24:28 ip-172-31-1-178 danted[1242]: alert: mother[1/1]: shutting down May 6 01:24:28 ip-172-31-1-178 systemd[1]: danted.service: Deactivated successfully. May 6 01:24:28 ip-172-31-1-178 systemd[1]: Stopped SOCKS (v4 and v5) proxy daemon (danted). May 6 01:24:28 ip-172-31-1-178 systemd[1]: Starting SOCKS (v4 and v5) proxy daemon (danted)... May 6 01:24:29 ip-172-31-1-178 systemd[1]: Started SOCKS (v4 and v5) proxy daemon (danted). May 6 01:24:29 ip-172-31-1-178 danted[1293]: info: Dante/server[1/1] v1.4.2 running