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

📄 unx09.htm

📁 Linux Unix揭密.高质量电子书籍.对学习Linux有大帮助,欢迎下载学习.
💻 HTM
📖 第 1 页 / 共 5 页
字号:

<P>As explained earlier, the header of a message contains all the information about the message. This generally includes who the message is from, who the message is going to, the date the message was sent, a message subject, and information about computers 

the message has passed through. These are the usual items, and there can be more. It's not unusual for the header of the message to be larger than the actual contents of the message!

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I12" NAME="I12">

<FONT SIZE=3><B>Header Format</B>

<BR></FONT></A></CENTER></H5>

<P>A header item looks like this:

<BR></P>

<PRE>keyword: value</PRE>

<P>keyword identifies the specific type of information this header item contains. It must start at the beginning of the line. value contains the actual value of this item. It can stretch over multiple lines&#151;this is indicated by starting following 
lines with white space (a tab or space).

<BR></P>

<P>Here's a common header item:

<BR></P>

<PRE>From: wakko@watertower.com</PRE>

<P>This identifies that the message is from wakko@watertower.com. Generally, the item is referred to by keyword, so this would be legitimately referred to as the From header of the message. This is opposed to just the header, which consists of all the 
header items in the message.

<BR></P>

<P>Here's an example of a header including a multiline header item:

<BR></P>

<PRE>From: luke@yoda.jedi.edu

Subject: Note how this subject is split and the

subsequent lines are started with spaces, as

opposed to the keywords, which are flush left

To: darth@deathstar.empire.gov</PRE>

<H5 ALIGN="CENTER">

<CENTER><A ID="I13" NAME="I13">

<FONT SIZE=3><B>Minimal Header Items</B>

<BR></FONT></A></CENTER></H5>

<P>Technically, the only header item you need to send mail to someone is the To header:

<BR></P>

<PRE>To: userid@domain</PRE>

<P>Normally, however, you will be asked for a Subject header when you compose the message. The recipient can view just the subject for a quick idea of what the message is about.

<BR></P>

<P>In addition, your mail program will probably add a Date header giving the time the message was sent, and a From header indicating your address. Here's a typical message just before it's sent:

<BR></P>

<PRE>From: cerebus@aardvarks.sim.com

To: astoria@regency.com

Date: Wed, 13 Sep 1312 13:43:12 -0300 (PST)

Subject: Talking

Cerebus is sick of your ceaseless talking. The

next time he sees you, Cerebus will use his sword,

then talk.</PRE>

<P>As your message travels from machine to machine, each machine along the way will add some routing information.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I14" NAME="I14">

<FONT SIZE=3><B>Common Header Items</B>

<BR></FONT></A></CENTER></H5>

<P>The best way to learn about common headers you will see on messages you receive is to examine an actual message. Most of this is an actual header from a message received by me, with names and addresses tampered with sufficiently to prevent the actual 
sender from getting strange e-mail.

<BR></P>

<PRE>From nihil@eniac.seas.void.edu Wed Feb  1 08:15:01 1993

Flags: 000000000015

Received: from phones.com (phones.com [229.46.62.22]) by

happy.phones.com (8.6.5/QC-BSD-2.1) via ESMTP;

id IAA13973 Wed, 1 Feb 1993 08:14:59 -0800 for

&lt;rdippold@happy.phones.com&gt;

Received: from linc.cis.void.edu (root@LINC.CIS.VOID.EDU

[230.91.6.8]) by phones.com (8.6.5/QC-main-2.3) via ESMTP;

id IAA14773 Wed, 1 Feb 1993 08:14:56 -0800 for

&lt;rdippold@phones.com&gt;

Received: from eniac.seas.void.edu (nihil@ENIAC.SEAS.VOID.EDU

[230.91.4.1]) by linc.cis.void.edu (8.6.5/VOID 1.4) with

ESMTP id LAA17163 for &lt;rdippold@phones.com&gt;

Wed, 1 Feb 1993 11:14:45 -0500

Received: from localhost by eniac.seas.void.edu

id LAA24236; Wed, 1 Feb 1993 11:14:44 -0500

From: nihil@eniac.seas.void.edu (Ex Nihilo Nihil Fit)

Sender: nihil@ocean.void.edu

Reply-To: nihil@void.edu,nihil@freenet.com

Cc: group-stuff@uunet.UU.NET

Cc: james@foobar.com

Message-Id: &lt;199302011614.LAA24236@eniac.seas.void.edu&gt;

Subject: Re: Apple IIe/IIgs Software and books for SALE...

To: rdippold@phones.com (Ron Dippold)

Date: Wed, 1 Feb 93 11:14:44 EST

In-Reply-To:     &lt;CMM.342342.rdippold@happy.phones.com&gt;;

from &quot;Ron Dippold&quot; at Feb 1, 93 1:00 am

X-Mailer: ELM [version 2.3 PL11-void1.13]

Mime-Version: 1.0

Content-Type: text/plain; charset=US-ASCII

Content-Transfer-Encoding: 7bit

Content-Length: 10234</PRE>

<P>I told you headers could be large_normally they're not this big, but this is a good example of all the major header items you need to know.

<BR></P>

<P>Here's the first line:

<BR></P>

<PRE>From nihil@eniac.seas.void.edu Wed Feb  1 08:15:01 1993</PRE>

<P>This line is actually added by my local mail program. It is used both as a quick message summary (who and when) and as a way to separate messages. A typical mail file is just a big text file, so you need some way to tell the start of one message from 
the end of the next. For most places, this is the text From at the start of a line. This also means that if you try to place a From at the start of a line of text in your actual message, your mail program should place a &gt; or some other character before 

it so that it doesn't falsely indicate the start of a new message.

<BR></P>

<PRE>Flags: 000000000015</PRE>

<P>Again, this is used by the local mail program. Each message can have several different statuses, such as deleted, unread, and flagged for further attention. This varies from program to program.

<BR></P>

<PRE>Received: from phones.com (phones.com [229.46.62.22]) by

happy.phones.com (8.6.5/QC-BSD-2.1) via ESMTP;

id IAA13973 Wed, 1 Feb 1993 08:14:59 -0800 for

&lt;rdippold@happy.phones.com&gt;</PRE>

<P>Remember that each machine that receives mail adds its own Received header to the top of the message. This is the first such header in the message, so it must be the last mail transfer. The machine happy.phones.com (where my mail is located) received 
the message from phones.com (our company gateway) on February 1, 1993. The transfer was done using sendmail 8.6.5 (you can't know from this header that it was sendmail) and the protocol used was ESMTP. The intended recipient is listed last&#151;this can 
change as the message goes through gateways, so it's helpful for tracking mail problems.

<BR></P>

<PRE>Received: from linc.cis.void.edu (root@LINC.CIS.VOID.EDU

[230.91.6.8]) by phones.com (8.6.5/QC-main-2.3) via ESMTP;

id IAA14773 Wed, 1 Feb 1993 08:14:56 -0800 for

&lt;rdippold@phones.com&gt;</PRE>

<P>Here's the mail transfer that got the message from void.edu to my site. It's a direct connection with no intermediaries.

<BR></P>

<PRE>Received: from eniac.seas.void.edu (nihil@ENIAC.SEAS.VOID.EDU

[230.91.4.1]) by linc.cis.void.edu (8.6.5/VOID 1.4) with

ESMTP id LAA17163 for &lt;rdippold@phones.com&gt;

Wed, 1 Feb 1993 11:14:45 -0500</PRE>

<P>Here the mail machine (linc.cis) at void.edu received the mail from another machine at void.edu (eniac.seas).

<BR></P>

<PRE>Received: from localhost by eniac.seas.void.edu

id LAA24236; Wed, 1 Feb 1993 11:14:44 -0500</PRE>

<P>Finally, here's the original sending of the message. One interesting piece of information that can be gleaned from this whole exchange is how long it took the mail to get from the sender to me. The message was sent at 11:14:44 -0500 and was received at 

08:14:59 -0800 on the same day. The -0500 and -0800 show the time zone differences. To get equivalent times for both messages, you add 5 hours to the time of the sending and add 8 hours to the time of receipt, to get 16:14:44 and 16:14:59, respectively. 
The message arrived in 15 seconds!

<BR></P>

<PRE>From: nihil@eniac.seas.void.edu (Ex Nihilo Nihil Fit)</PRE>

<P>This is who sent me the message. The portion in parentheses is a comment. It usually contains the person's name, but in this case is a saying in Latin.

<BR></P>

<PRE>Sender: nihil@ocean.void.edu</PRE>

<P>Sender is the &quot;authenticated identity&quot; of the person who sent the message. This is where the sending computer tells you that, as nearly as it can determine, this is the account that actually sent the message, regardless of what the From header 

says. This is useful if one person is authorized to send mail for another, such as a secretary, or if one member of a group is sending a message for the whole group. If the Sender header is the same as the From header, it doesn't need to be added. In this 

case, Nihil sent mail from a machine within his organization different from the one given in his address. This isn't a big deal. If the From and Sender headers are radically different, however, the mail may be a forgery.

<BR></P>

<PRE>Reply-To: nihil@void.edu,nihil@freenet.com</PRE>

<P>The Reply-To header specifies who your reply should go to if you respond. Your mail software should be smart enough to do this automatically. There are usually two reasons for using a Reply-To header. The first is if the address given in the From header 

is broken and you can't fix it&#151;usually because your mail administrator doesn't know what he or she is doing or doesn't care. The second is if your primary address is somewhat unreliable. Nihil has another mail account at freenet.com&#151;if for some 
reason void.edu goes offline, he can still get much of his mail at his freenet account.

<BR></P>

<PRE>Cc: group-stuff@zznet.ZZ.NET

Cc: james@foobar.com</PRE>

<P>The message was also sent to group-stuff@zznet.ZZ.NET and james@foobar.com. You can choose whether to include them in your reply. This also could have been done in a single header statement:

<BR></P>

<PRE>Cc: group-stuff@zznet.ZZ.NET,james@foobar.com</PRE>

<P>Either form is acceptable. Headers such as From or Sender, however, should appear only once in the entire header.

<BR></P>

<PRE>Message-Id: &lt;199302011614.LAA24236@eniac.seas.void.edu&gt;</PRE>

<P>It is very helpful when trying to track a message for debugging, cancellation, or other purposes if every message has a unique identification. The method of generating this unique ID varies from site to site. There should never be another message with 
this specific ID generated by any machine anywhere on the network. Using @eniac.seas.void.edu makes it a local problem only.

<BR></P>

<PRE>Subject: Re: Apple IIe/IIgs Software and books for SALE...</PRE>

<P>This is the subject of the message. My mail program shows me a one-line summary of each message, including the From, Date, and Subject headers.

<BR></P>

<PRE>To: rdippold@phones.com (Ron Dippold)</PRE>

<P>This is who the message was sent to (me, in this case). Sometimes your local computer will strip off the @phones.com part.

<BR></P>

<PRE>Date: Wed, 1 Feb 93 11:14:44 EST</PRE>

<P>This is the date the mail was originally sent. EST is Eastern Standard Time&#151;another way of giving the time zone.

<BR></P>

<PRE>In-Reply-To:  &lt;CMM.342342.rdippold@happy.phones.com&gt;;

from &quot;Ron Dippold&quot; at Feb 1, 93 1:00 am</PRE>

<P>This message is a reply to a message that I sent with the message ID given above.

<BR></P>

<PRE>X-Mailer: ELM [version 2.3 PL11-void1.13]</PRE>

<P>The sender used the Elm Mail System to send this piece of mail. This can be useful in debugging, but usually it's a bit of self-promotion by the mail program.

<BR></P>

<PRE>Mime-Version: 1.0

Content-Type: text/plain; charset=US-ASCII

Content-Transfer-Encoding: 7bit</PRE>

<P>This deals with something that will be discussed later, MIME message format. Briefly, this says that the message contains only 7-bit text, which is nothing out of the ordinary.

<BR></P>

<PRE>Content-Length: 10234</PRE>

<P>The length of the body of the message (not shown here) is 10,234 characters.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I15" NAME="I15">

<FONT SIZE=3><B>Other Header Items</B>

<BR></FONT></A></CENTER></H5>

<P>There are some other header items that might be occasionally useful for you to know:

<BR></P>

<PRE>Bcc: recipient</PRE>

<P>Bcc is blind carbon copy. This is like the Cc header, except that those who are sent the message because their address appears in the Cc or From headers don't see that the message was sent to those specified in the Bcc header. Use this to send a copy of 

a message to someone without letting the others know you're sending it.

<BR></P>

<PRE>Keywords: keyword, keyword</PRE>

<P>These are keywords relating to the message. This is mostly a comment field&#151;some mail programs will let you search on <I>keyword</I>.

<BR></P>

<PRE>Comments: comments</PRE>

<P>This allows you to make comments on the message without actually including them in the body of the message.

<BR></P>

<PRE>Encrypted: software keyhelp</PRE>

<P>This indicates that the message body is encrypted with encryption software, and the optional keyhelp helps with selecting the key to decode with. Note that the header itself cannot be encrypted since it contains vital routing information.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I16" NAME="I16">

<FONT SIZE=3><B>Date Fields</B>

<BR></FONT></A></CENTER></H5>

<P>Dates used in headers look like this:

<BR></P>

<PRE>Wed, 1 Feb 93 11:44 -500</PRE>

⌨️ 快捷键说明

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