SMTP Проверка доступности/авторизации

#
swaks -a -tls -q HELO -s mail.domain.com -au test -ap '<>'
#
openssl s_client -connect mail.domain.com:25 -starttls smtp
 perl -MMIME::Base64 -e 'print encode_base64("login");'

[email protected]:~# 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
emFiYml4
334 UGFzc3dvcmQ6
WmFiaXgxNg==
235 2.7.0 Authentication successful
QUIT