Linux下邮件(mail)查收


Headnotes

Many equations and formulas look intimidating. However, when you hunt them down, they are definitely not! Just papertigers!

Now let's hunt the papertiger.

Linux下mail使用技巧

登录LINUX系统后,经常会看到”you have mail”,却苦于不知道如何查看,相信菜鸟们都遇到过,偶在网上用“linux mail”找了很久,但大都是介绍mail服务器的,黄天总算没负有心人,在洪恩在找到一篇介绍基础的文章,不敢独享。

系统提供了用户之间通信的邮件系统,当用户打开终端注册登录时发现系统给出如下信息:
you have mail.

这时用户可通过键入mail命令读取信件:

$ mail

mail程序将逐个显示用户的信件,并依照时间顺序,显示最新的信件。每显示一段信件,mail都询问用户是否要对该信件作些处理。若用户回答d,则表示 删除信件;若仅按回车键,表示对信件不作任何改动(信件仍旧保存,下次还可读这一信件);若回答p,则要求重复显示信件;s filename表示要把信件存入所命名的文件;若回答q,表示要从mail退出。

我们在本章的第一个例子中演示了如何写一封信,作为练习,你可送信件给自己,然后键入mail读取自己发的信件,看看会有什么效果。(发信给自己是一种设置备忘录的方法)。

$mail frank 给自己写信

subject: test

This is a mail test

CRL-d

EOT

$

$mail 查看信件

“/var/spool/mail/frank:”1 message 1 new

>Nfrank@xteam.xteamlinux.comThu Mar 25 11:00 13/403 “test”

&

Message 1:

From frank Thu Mar 25 11:00:25 1999/3/25

Received: (fromfrank@localhost)

by xteam.xteamlinux.com(8.8.4/8.8.4)

id LAA05170 for frank;Thu 25 Mar 1999 11:00:25 GMT

Date: Thu,25 Mar 1999 11:00:25 GMT

From:RHS Linux User <root@newtradepowre.com>

Message-Id:<199903251142.LAA05170@xteam.xteamlinux.com>

To:frank@xteam.xteamlinux.com

Subject:test

Status:R

This is a mail test

&

mail命令还有很多其它用法,例如发送事先准备好的信件,或一次送信给若干人。还可以用其它方法送信件。

另附message的使用技巧:

当Linux系统处于多用户的情况下,有时在终端上会突然显示出下述信息:

Message from renee tty2…

并伴随出现一阵嘟嘟响声。这是用户renee想和你通话而产生的信号。若你用如下命令响应他:

$ write renee

这就建立起了你和renee的通信线路,renee在他的终端上键入的内容同时显示在你的终端上,反之你键入的内容也显示在renee的终端上。为区分终 端上哪些是你输入的,哪些是renee输入的,我们使用如下通话协议:(o)表示一段话说完,并让对方发话,(oo)代表通话结束并退出程序。

renee’s terminal: frank terminal:

[renee@xteam renee]$ write frank

$ Message from renee tty2…

$write renee

[renee@xteam renee]$Message from you tty1…

did you forget lunch? (o)

did you forgeet lunch? (o)

ten minutes (o)

ten minutes (o)

ok (oo)

ok (oo)

ctl-d

EOF

Ctl-d

EOF

[renee@xteam renee]$ $

除CTL-d键外,也可以使用DELETE退出write命令。

如果你不愿意别人干扰你的工作,可以使用mesg命令拒绝接受通话。当你向一个拒绝接收通话的用户发写命令、或者向没有注册的用户要求通话时,write命令会显示不能通话的原因。

转自:http://edu.codepub.com/2010/0413/21978.php


Footnotes

There are many excellent tutorials out there. Some tutorials are too intuitive and it's helpful, but you cannot get it straight on the math details. Some focused on dymestifying math. Some focused on code. I found the best tutorials that give you the conceptual ideas and are possible for implementation without being blind to the math details. Drop a comment if I failed. It would be really appreciable.


If you want to cite this article, please cite this article as:

Lachlan Chen, "Linux下邮件(mail)查收," in EarnFromScratch, June 30, 2014, https://www.earnfs.com/en/html/1143.htm.

or

@misc{lachlanchen2020tutorial,
title=Linux下邮件(mail)查收,
author={Chen, Lachlan},
year=June 30, 2014
}


EarnFromScratch (September 27, 2020) Linux下邮件(mail)查收. Retrieved from https://www.earnfs.com/en/html/1143.htm.
"Linux下邮件(mail)查收." EarnFromScratch - September 27, 2020, https://www.earnfs.com/en/html/1143.htm
EarnFromScratch June 30, 2014 Linux下邮件(mail)查收., viewed September 27, 2020,<https://www.earnfs.com/en/html/1143.htm>
EarnFromScratch - Linux下邮件(mail)查收. [Internet]. [Accessed September 27, 2020]. Available from: https://www.earnfs.com/en/html/1143.htm
"Linux下邮件(mail)查收." EarnFromScratch - Accessed September 27, 2020. https://www.earnfs.com/en/html/1143.htm
"Linux下邮件(mail)查收." EarnFromScratch [Online]. Available: https://www.earnfs.com/en/html/1143.htm. [Accessed: September 27, 2020]


Leave a Reply