telnet で smtp 接続

素のSMTP
[xxxx ~]$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 xxxx.xxxxxxxx.com ESMTP unknown
HELO [domain名].com
250 xxxx.xxxxxxxx.com
MAIL FROM:[メールアドレス]
250 2.1.0 Ok
RCPT TO:[メールアドレス]
250 2.1.5 Ok
DATA
354 End data with .
hoge
foo
bar
.
250 2.0.0 Ok: queued as xxxxxxxxxx
quit
221 2.0.0 Bye
Connection closed by foreign host.
SMTP-AUTH認証方法確認
[xxxx ~]$ telnet xxxx.xxxx.com 587
Trying xx.xx.xx.xx...
Connected to smtp.xxxx.com (xx.xx.xx.xx).
Escape character is '^]'.
220 xxxx.xxxx.com ESMTP xxxxxxxx
EHLO localhost
250-xxxx.xxxx.com Hello xxxx.xxxx.com [xx.xx.xx.xx], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 20971520
250-DSN
250-AUTH=PLAIN LOGIN CRAM-MD5
250-AUTH PLAIN LOGIN CRAM-MD5
250-DELIVERBY
250 HELP
quit
221 2.0.0 xxxx.xxxx.com closing connection
Connection closed by foreign host.