Monday, August 2, 2010

Test AUTH SMTP Connection

Lengkapnya bisa diliat di link ini: http://qmail.jms1.net/test-auth.shtml. Saya coba summaries cara mudahnya sbb:

1. Create dulu base64 encode dari email address dan password kita:

$ perl -MMIME::Base64 -e 'print encode_base64("\000[mailbox]\@[domain]\000[password]")'

contoh:
$ perl -MMIME::Base64 -e 'print encode_base64("\000kostka\@cbn.net.id\000passkostka")'
AGtvc3RrYUBjYm4ubmkAGNibm00MWxndTM=


2. menggunakan telnet-ssl

$ telnet-ssl -z ssl smtps.cbn.net.id 465
Trying 210.210.145.21...
Connected to smtps.cbn.net.id.
Escape character is '^]'.
220 mx-corp3b.int.cbn.net.id ESMTP
ehlo cbn.net.id
250-mx-corp3b.int.cbn.net.id Hello cheyenne.cbn.net.id [202.158.50.81]
250-SIZE 10485760
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
auth plain AGtvc3RrYUBjYm4ubmkAGNibm00MWxndTM=
235 Authentication succeeded
mail from: kostka@cbn.net.id
250 OK
rcpt to: tslan@cbn.net.id
250 Accepted
data
354 Enter message, ending with "." on a line by itself
test ke-2 :)
.
250 OK id=1Obqkv-0004Qq-Nf


3. menggunakan openssl

$ openssl s_client -connect smtps.cbn.net.id:465
CONNECTED(00000003)
--- edited for security purposes ---
---
220 mx-corp3e.int.cbn.net.id ESMTP
ehlo cbn.net.id
250-mx-corp3e.int.cbn.net.id Hello cheyenne.cbn.net.id [202.158.50.81]
250-SIZE 10485760
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
auth plain AGtvc3RrYUBjYm4ubmkAGNibm00MWxndTM=
235 Authentication succeeded
mail from: kostka@cbn.net.id
250 OK
rcpt to: tslan@cbn.net.id
250 Accepted
data
354 Enter message, ending with "." on a line by itself
test kirim email via telnet ke smtps cbn :)
.
250 OK id=1ObqiT-000103-Kk

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)