1.telnet to send mail from command line
telnet xxx.xxx.xxx.xxx 25 #xxx.xxx.xxx.xxx stands for your mail server ip,same of the rest of the article
AUTH LOGIN #here we assume that account of your mail is [email protected],password iloveyou
c2VydmljZUB5b3VyZG9tYWluLnRsZA== #After the server has responded,type in the encoded username by base64 arithmetic.Method:echo -n ‘[email protected]’|base64
aWxvdmV5b3U= #type in the encoded password by base64 arithmetic.Method:echo -n ‘iloveyou’|base64
mail from: username #if username here has space,using quotation marks to enclose it,like “user name”
rcpt to: [email protected] #receiver
Subjet: My first mail on Postfix
Are you there?
OK!Now the customer of yours is expected to get your mail.(If not,please check your mail server’s configurations,such as whether your mail server has a reverse DNS,and your mail server cannot be a open relay MTA,for many MTA refuse to receive letter from a open relay MTA.)
2.telnet to receive & read mail from command line
telnet xxx.xxx.xxx.xxx 110
USER [email protected] #your account name,note that USER should be capitalized
PASS iloveyou #your password
list #to list the table of your unread messages
retr 2 #to read the content of the second unread message of the list
3.mail to send mail from command line:
mail [email protected] #receiver
#after the response,type in the Subject of your mail
#Enter,then type in the content of your mail
#If you finish the content,press Ctrl+D to end the procedure(or using a dot . to end it).Then it prompts Cc(carbon copy).If the mail has a Cc,just type in the mail address.
That’s it.Try it by yourself!