Skip to content

SMTP checking: swaks, openssl, telnet

Swaks

swaks -a -tls -q HELO -s mail.domain.com -au [USERNAME] -ap '[PASSWORD]'

OpenSSL

openssl s_client -connect mail.domain.com:25 -starttls smtp

Telnet

Prepare credentials

$ echo -n username | base64
dXNlcm5hbWU=

$ echo -n Pa$$W0rd | base64
UGE2MzgxNzJXMHJk

Connect

$ telnet mail.domain.com 25
Trying 192.168.112.59...
Connected to mail.domain.com.
Escape character is '^]'.
220 mail.domain.com Microsoft ESMTP MAIL Service ready at Tue, 17 May 2016 15:
ehlo test
250-mail.domain.com Hello [192.168.112.61]
250-SIZE
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-AUTH LOGIN
250-8BITMIME
250-BINARYMIME
250 CHUNKING
AUTH LOGIN
334 VXNlcm5hbWU6
dXNlcm5hbWU=
334 UGFzc3dvcmQ6
UGE2MzgxNzJXMHJk
235 2.7.0 Authentication successful
QUIT

mail-server-checking