有關寄發電郵方面,是使用 telnet 連接電郵伺服器的 port 25,例如 netvigator 便是 smtp.netvigator.com:25
這些伺服器需要登入才能使用,登入名字及密碼需要以 base64 的格式傳送。我試過使用轉碼網頁,但不成功。最後發現使用 Mac 機非常簡單,只要在命令提示視窗中打入 perl 指令便可以,在 Windows 系統中我就不曉得如何做了,可能需要建立一個 perl server。
Find your authentication information
In order to use the AUTH command, you need to know the base64-encoded version of the userid and password you will be using to authenticate to the server. Normally this would be the same as the userid and password you would use to check your mail using IMAP or POP3. This perl command (which requires the MIME::Base64 module) will do the encoding for you:
% perl -MMIME::Base64 -e 'print encode_base64("\000jms1\@jms1.net\000not.my.real.password")'
AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=
Note: Make sure to use \0 both as the first character of what you're encoding, and as the separator between the userid and the password. There was an error with the original version of these directions- I had forgotten about needing a \0 at the beginning. Sorry all!
Another reader pointed out that perl silently interprets the "@" sign in the middle of a string and replaces it with the contents of an array with that name, if one exists... or with nothing, if not. I just did a full two-way test with my real password, and it turns out if you don't put a backslash in front of the "@" sign it won't work. Good call.
And JT Justman pointed out that if you use \0 as the separator, and the userid or password happens to start with a digit, perl will try to find and use a three-digit octal character code instead of a one-digit null byte with two normal digits behind it. Using \000 instead of just \0 prevents this from happening.
See:
http://qmail.jms1.net/test-auth.shtml for detail