⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 410-414.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Configuration and Installation:Linux and the Internet</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=1558285660//-->

<!--TITLE=Linux Configuration and Installation//-->

<!--AUTHOR=Patrick Volkerding//-->

<!--AUTHOR=Kevin Reichard//-->

<!--AUTHOR=Eric Foster//-->

<!--PUBLISHER=IDG Books Worldwide, Inc.//-->

<!--IMPRINT=M & T Books//-->

<!--CHAPTER=9//-->

<!--PAGES=410-414//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="407-410.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="414-418.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<P><FONT SIZE="+1"><B>Receiving Mail</B></FONT></P>

<P>Linux informs you of incoming mail when you login the system. You&#146;ll see a message like:

</P>

<!-- CODE SNIP //-->

<PRE>

  You have mail.

</PRE>

<!-- END CODE SNIP //-->

<P>Unless you read your mail at this point, this message will reappear periodically, as the shell is automatically set up to remind you of unread mail.

</P>

<P>To view this mail, type:</P>

<!-- CODE SNIP //-->

<PRE>

  gilbert:/$ mail

</PRE>

<!-- END CODE SNIP //-->

<P>You&#146;ll see something like what&#146;s shown in Figure 9.1.

</P>

<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/09-01.jpg',579,340 )"><IMG SRC="images/09-01t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/09-01.jpg',579,340)"><FONT COLOR="#000077"><B>Figure 9.1</B></FONT></A>&nbsp;&nbsp;Incoming mail.</P>

<P>The shell responds with a list of your mail messages, listed in the order they were received by your system, newest mail first. The first field lists the sender of the message, the second through fifth fields denote the time and date the message was received, the sixth field records the number of lines in the message and the size of the message (in bytes), and the final field indicates the subject of the message.

</P>

<P>Press <B>Enter</B> to read the first message on the list. If it&#146;s a long message, the entire message will scroll by. If you want to stop scrolling the message, type <B>Ctrl-S</B>; to start it again, type <B>Ctrl-Q</B>.</P>

<P>There are two types of messages waiting for us: messages from <I>root</I> and messages from <I>volkerdi@mhd1.moorhead</I>. If you&#146;re connected to the Internet and have your own network with other users, your electronic mail can come from two sources: your own system and other systems. Mail from other systems, sent on the Internet or the Usenet, has its own unique addressing scheme (more on that in the next section). Mail from your own system uses the same login names as described in Chapter 1; these names are contained in the <B>/etc/passwd</B> file.</P>

<P>The newer addressing scheme, and one that is growing in popularity (mainly because of the growing popularity of the Internet), is called <I>domain addressing</I>. Structured as the exact opposite of a bang path, a domain address couples the name of the user with an address. This scheme grew out of the need for international standardization of electronic-mail addresses and provides a hierarchical structure to addressing. Essentially, the world is split into country domains, which are divided into educational domains (indicated by the suffix <I>.edu</I> in the address) and commercial domains (indicated by the suffix <I>.com</I> in the address). There are hundreds and hundreds of commercial and educational domains, and the number is growing every day.</P>

<P>Reading a domain address is quite simple. In the address of:</P>

<P><I>reichard@mr.net</I></P>

<P><I>reichard</I> refers to the user, while <I>mr.net</I> refers to the domain. The user and domain names are separated by the at <I>(c)</I> symbol. As a user, you don&#146;t need to know the specific path a message must take, nor do you need to know the name of a gateway. With a domain address, sending a message is simple:</P>

<!-- CODE SNIP //-->

<PRE>

     gilbert:/$ mail reichard@mr.net

</PRE>

<!-- END CODE SNIP //-->

<P>The idea of the Internet is fairly amorphous and abstract. The Internet is technically a collection of many networks that somehow manage to talk to each other. As a user, all you need to know is a recipient&#146;s electronic-mail address; the system administrator handles the basic details of linking a system to the Internet.

</P>

<P>If you&#146;re on the Internet, you can also receive electronic-mail from afar. To find your machine address, type <B>uname -n</B> at the prompt:</P>

<!-- CODE SNIP //-->

<PRE>

     gilbert:/$ uname -n

     gilbert

</PRE>

<!-- END CODE SNIP //-->

<P>where <I>gilbert</I> is the name of your UNIX system, also called the <I>hostname</I>. To list all the systems you can directly communicate with, type <B>uname</B>:</P>

<!-- CODE SNIP //-->

<PRE>

     gilbert:/$ uname

     <I>othersystem1</I>

     <I>othersystem2</I>

     <I>othersystem3</I>

</PRE>

<!-- END CODE SNIP //-->

<P>where <I>othersystem</I> refers to the other systems.</P>

<P>The <B>uname</B> command doesn&#146;t support this option on all systems. If this is the case, you can look in the file <B>/etc/hosts</B> covered earlier in this chapter, to get a good idea of what other systems your computer networks with.</P>

<P>In a large regional or nationwide network, the list of other systems can be quite large. If you want to find a specific system and you don&#146;t want to wade through a huge list of names, use <B>uname</B> in conjunction with <B>grep</B>:</P>

<!-- CODE SNIP //-->

<PRE>

  $ uname | grep othersystem121

  othersystem121

</PRE>

<!-- END CODE SNIP //-->

<P>If the name of the other system is returned, you can send electronic mail to someone with an account on that system. In addition, you can send messages to people on the Internet if you are connected to the Internet, provided you know the exact address of the recipient.

</P>

<P>Let&#146;s look at the first message from <I>root</I>, shown in Figure 9.2.</P>

<P><A NAME="Fig2"></A><A HREF="javascript:displayWindow('images/09-02.jpg',582,368 )"><IMG SRC="images/09-02t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/09-02.jpg',582,368)"><FONT COLOR="#000077"><B>Figure 9.2</B></FONT></A>&nbsp;&nbsp;An incoming electronic-mail message.</P>

<P>At the beginning of an e-mail message is a <I>header</I>. With the Internet, mail may go between one or more systems on its way to you. You can&#146;t count on a direct link between systems, and because of these uncontrollable paths it may take some time for a message to reach the recipient; delivery times of 15 hours to 24 hours are not uncommon, but neither are delivery times of 10 seconds.</P>

<P><FONT SIZE="+1"><B>Creating Mail</B></FONT></P>

<P>It&#146;s very easy to create mail. (Too easy, some would say, as they survey mailboxes full of irrelevant mail messages.) To create a short message at the keyboard, simple combine <B>mail</B> with the name of the recipient, followed by a period on its own line. The resulting mail is shown in Figure 9.3.</P>

<P><A NAME="Fig3"></A><A HREF="javascript:displayWindow('images/09-03.jpg',582,368 )"><IMG SRC="images/09-03t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/09-03.jpg',582,368)"><FONT COLOR="#000077"><B>Figure 9.3</B></FONT></A>&nbsp;&nbsp;Incoming mail.</P>

<P>As always, end input from the keyboard by typing <B>Ctrl-D</B>. Some e-mail programs also accept a single period on its own line to terminate the message, instead of <B>Ctrl-D</B>. The procedure would be the same if you were sending a message to a user on a remote machine:</P>

<!-- CODE SNIP //-->

<PRE>

     gilbert:/$ mail reichard@mr.net

</PRE>

<!-- END CODE SNIP //-->

<P>You can send the same message to multiple users with the -<I>t</I> option:</P>

<!-- CODE SNIP //-->

<PRE>

     gilbert:/$ mail -t johnsone@camax.com reichard@mr.net

     This, too, is a test.

     .

</PRE>

<!-- END CODE SNIP //-->

<P>The resulting message will contain multiple To: fields in the header.

</P>

<P>Sending an existing file as the text of an electronic-mail message is almost as simple. After creating an ASCII file using <B>vi</B> or <B>emacs</B>, save the file and then redirect it as input on the command line:</P>

<!-- CODE SNIP //-->

<PRE>

     gilbert:/$ mail johnsone@camax.com &lt; note

</PRE>

<!-- END CODE SNIP //-->

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="407-410.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="414-418.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -