Thursday, August 27, 2009

Telnet command ကေန Email ပို႔နည္း

အခုကြ်န္ေတာ္တို႔ Telnet command ကေန Email ပို႔နည္းေလးစမ္းၾကည္႔ၾကရေအာင္။
ပထမဆံုး ကြ်န္ေတာ္တို႔ ရွိမွာ SMTP mail server တစ္ခုခုရွိရမယ္.
ၿပီးရင္ mail server ရဲ႕ FQDN (Fully qualified domain name) သိရမယ္။ Server မွာ
telnet port 23 နဲ႔္ SMTP port 25 ပြင္႔ေနရပါမယ္။
Windows XP ရွိတဲ႔ Computer တစ္လံုးကေန စမ္းၾကည္႔ၾကစို႔။
Windows XP ရဲ႕ command line ဖြင္႔ ၿပီး
cmd:>Telnet mailserver.domain.com 25 ရိုက္ၿပီး enter ေခါက္လိုက္ပါ။
Command prompt မွ " 220 eacdc1.eac.com.mm Microsoft ESMTP MAIL Service,
Version: 6.0.3790.1830 ready at Thu, 27 Aug 2009 08:39:06 +0630 "
Message ေပၚလာပါမယ္။
Server က telnet port ပြင္႔ၿပီး Exchange server running ၿဖစ္ေနတယ္။
Message မွာ server name, Microsoft exchange smtp service version ဘယ္ေလာက္
running ၿဖစ္ေနေၾကာင္း ဘယ္အခ်ိန္ connect လုပ္ေၾကာင္း ေပၚေနမည္။
ေနာက္တစ္မ်ိဳးက command line ဖြင္႔ၿပီး telnet လို႔ရုိက္ၿပီး Enter ေခါက္လိုက္ပါ။
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> ၿပီးရင္ အို(o) ေလးႏိုပ္လိုက္ပါ. အိုရဲ႕အဓၵိပယ္ကေတာ႔ open ပါ။
Microsoft Telnet> o
( to ) 192.168.21.253 25 ဒါဆိုလဲ server ကို connect ၿဖစ္သြားလိမ္႔မယ္။
helo myserver.domain.com
250 mailserver.domain.com Hello [10.1.11.133]
mail from:
250 2.1.0 myname@mydomain.com....Sender OK
rcpt to:
250 2.1.5 recipientname@mydomain.com
data
354 Start mail input; end with .
subject: This is a test mail
to: recipientname@mydomain.com
This is the text of my test mail.
250 2.6.0 Queued mail for delivery quit

ၿပီးရင္ outlook ကေန email စစ္ၾကည္႔လိုက္ပါ။ email ေရာက္ေနပါလိမ္႔မယ္။