メールの送受信 telnet&mailコマンド

SMTPコマンド例


$ telnet xxx.xxx.xxx.xxx 25


helo
mail from:uso@800.com
rcpt to:xxx@yyy.zzz


data
Subject: This is test mail.
From: Uso
To: You


Hello xxx!
.


POP コマンド例


$ telnet zzz.zzz.zzz.zzz 110


user username
pass hogehoge


stat
list [#]
retr #


quit

                                      • -

mailコマンド


送信時

mail -s test who@am.i
Hello,
Bye.
.

送信元を指定する場合は、
mail -s test who@am.i -- -f uso@800.com
(--に続けて、sendmailオプション)

受信時

mail
h      : メール一覧表示
n*     : メール移動&表示
d [a]  : カレントのメール削除[ボックス内の全メール削除]
u [n*] : 削除の中止[メールを指定し削除の解除]
n      : 次のメールを表示
-      : 前のメールを表示
(※n*は数字、個別メールのインデックス)

Ref. SMTPクライアント用コマンド一覧
http://solaris-user.com/sendmail/smtp-command.html