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

📄 intro.me

📁 早期freebsd实现
💻 ME
📖 第 1 页 / 共 3 页
字号:
.\" Copyright (c) 1983 Eric P. Allman.\" Copyright (c) 1988, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)intro.me	8.2 (Berkeley) 11/27/93.\".\"	pic -Pxx intro.me | ditroff -me -Pxx.eh 'SMM:9-%''SENDMAIL \*- An Internetwork Mail Router'.oh 'SENDMAIL \*- An Internetwork Mail Router''SMM:9-%'.nr si 3n.if n .ls 2.+c.(l C.sz 14SENDMAIL \*- An Internetwork Mail Router.sz.spEric Allman*.sp 0.5.iUniversity of California, BerkeleyMammoth Project.)l.sp.(l F.ceABSTRACT.sp \n(psuRouting mail through a heterogenous internet presents many newproblems.  Among the worst of these is that of address mapping.Historically, this has been handled on an.i "ad hoc"basis.  However,this approach has become unmanageable as internets grow..sp \n(psuSendmail acts a unified "post office" to which all mail can besubmitted.  Address interpretation is controlled by a productionsystem, which can parse both domain-based addressing and old-style.i "ad hoc"addresses.The production system is powerfulenough to rewrite addresses in the message header to conform to thestandards of a number of common target networks, including old(NCP/RFC733) Arpanet, new (TCP/RFC822) Arpanet, UUCP, and Phonenet.Sendmail also implements an SMTP server, messagequeueing, and aliasing..)l.sp 2.(f*A considerable part of this workwas done while under the employof the INGRES Projectat the University of California at Berkeleyand at Britton Lee..)f.pp.i Sendmailimplements a general internetwork mail routing facility,featuring aliasing and forwarding,automatic routing to network gateways,and flexible configuration..ppIn a simple network,each node has an address,and resources can be identifiedwith a host-resource pair;in particular,the mail system can refer to usersusing a host-username pair.Host names and numbers have to be administered by a central authority,but usernames can be assigned locally to each host..ppIn an internet,multiple networks with different charactersticsand managementsmust communicate.In particular,the syntax and semantics of resource identification change.Certain special cases can be handled triviallyby.i "ad hoc"techniques,such asproviding network names that appear local to hostson other networks,as with the Ethernet at Xerox PARC.However,  the general case is extremely complex.For example,some networks require point-to-point routing,which simplifies the database update problemsince only adjacent hosts must be enteredinto the system tables,while others use end-to-end addressing.Some networks use a left-associative syntaxand others use a right-associative syntax,causing ambiguity in mixed addresses..ppInternet standards seek to eliminate these problems.Initially, these proposed expanding the address pairsto address triples,consisting of{network, host, resource}triples.Network numbers must be universally agreed upon,and hosts can be assigned locallyon each network.The user-level presentation was quickly expandedto address domains,comprised of a local resource identificationand a hierarchical domain specificationwith a common static root.The domain techniqueseparates the issue of physical versus logical addressing.For example,an address of the form.q "eric@a.cc.berkeley.arpa"describes only the logicalorganization of the address space..pp.i Sendmailis intended to help bridge the gapbetween the totally.i "ad hoc"worldof networks that know nothing of each otherand the clean, tightly-coupled worldof unique network numbers.It can accept old arbitrary address syntaxes,resolving ambiguities using heuristicsspecified by the system administrator,as well as domain-based addressing.It helps guide the conversion of message formatsbetween disparate networks.In short,.i sendmailis designed to assist a graceful transitionto consistent internetwork addressing schemes..sp.ppSection 1 discusses the design goals for.i sendmail .Section 2 gives an overview of the basic functions of the system.In section 3,details of usage are discussed.Section 4 compares.i sendmailto other internet mail routers,and an evaluation of.i sendmailis given in section 5,including future plans..sh 1 "DESIGN GOALS".ppDesign goals for.i sendmailinclude:.npCompatibility with the existing mail programs,including Bell version 6 mail,Bell version 7 mail[UNIX83],Berkeley.i Mail[Shoens79],BerkNet mail[Schmidt79],and hopefully UUCP mail[Nowitz78a, Nowitz78b].ARPANET mail[Crocker77a, Postel77]was also required..npReliability, in the sense of guaranteeingthat every message is correctly deliveredor at least brought to the attention of a humanfor correct disposal;no message should ever be completely lost.This goal was considered essentialbecause of the emphasis on mail in our environment.It has turned out to be one of the hardest goals to satisfy,especially in the face of the many anomalous message formatsproduced by various ARPANET sites.For example,certain sites generate improperly formated addresses,occasionallycausing error-message loops.Some hosts use blanks in names,causing problems withUNIX mail programs that assume that an addressis one word.The semantics of some fieldsare interpreted slightly differentlyby different sites.In summary,the obscure features of the ARPANET mail protocolreally.i areused andare difficult to support,but must be supported..npExisting software to do actual deliveryshould be used whenever possible.This goal derives as much from political and practical considerationsas technical..npEasy expansion tofairly complex environments,including multipleconnections to a single network type(such as with multiple UUCP or Ether nets[Metcalfe76]).This goal requires consideration of the contents of an addressas well as its syntaxin order to determine which gateway to use.For example,the ARPANET is bringing up theTCP protocol to replace the old NCP protocol.No host at Berkeley runs both TCP and NCP,so it is necessary to look at the ARPANET host nameto determine whether to route mail to an NCP gatewayor a TCP gateway..npConfiguration should not be compiled into the code.A single compiled program should be able to run as is at any site(barring such basic changes as the CPU type or the operating system).We have found this seemingly unimportant goalto be critical in real life.Besides the simple problems that occur when any program gets recompiledin a different environment,many sites like to.q fiddlewith anything that they will be recompiling anyway..np.i Sendmailmust be able to let various groups maintain their own mailing lists,and let individuals specify their own forwarding,without modifying the system alias file..npEach user should be able to specify which mailer to executeto process mail being delivered for him.This feature allows users who are using specialized mailersthat use a different format to build their environmentwithout changing the system,and facilitates specialized functions(such as returning an.q "I am on vacation"message)..npNetwork traffic should be minimizedby batching addresses to a single host where possible,without assistance from the user..ppThese goals motivated the architecture illustrated in figure 1..(z.hl.ie t \\{\.ie !"\*(.T"" \\{\.PSboxht = 0.5iboxwid = 1.0i	downS:	[		right	S1:	box "sender1"		move		box "sender2"		move	S3:	box "sender3"	]	arrowSM:	box "sendmail" wid 2i ht boxht	arrowM:	[		right	M1:	box "mailer1"		move		box "mailer2"		move	M3:	box "mailer3"	]	arrow from S.S1.s to 1/2 between SM.nw and SM.n	arrow from S.S3.s to 1/2 between SM.n and SM.ne	arrow from 1/2 between SM.sw and SM.s to M.M1.n	arrow from 1/2 between SM.s and SM.se to M.M3.n.PE.\}.el \.	sp 18.\}.el \{\.(c+---------+   +---------+   +---------+| sender1 |   | sender2 |   | sender3 |+---------+   +---------+   +---------+     |  	   |             |     +----------+  +  +----------+		|  |  |		v  v  v            +-------------+            |   sendmail  |            +-------------+		|  |  |     +----------+  +  +----------+     |  	   |             |     v             v             v+---------+   +---------+   +---------+| mailer1 |   | mailer2 |   | mailer3 |+---------+   +---------+   +---------+.)c.\}.ceFigure 1 \*- Sendmail System Structure..hl.)zThe user interacts with a mail generating and sending program.When the mail is created,the generator calls.i sendmail ,which routes the message to the correct mailer(s).Since some of the senders may be network serversand some of the mailers may be network clients,.i sendmailmay be used as an internet mail gateway..sh 1 "OVERVIEW".sh 2 "System Organization".pp.i Sendmailneither interfaces with the usernor does actual mail delivery.Rather,it collects a messagegenerated by a user interface program (UIP)such as Berkeley.i Mail ,MS[Crocker77b],or MH[Borden79],edits the message as required by the destination network,and calls appropriate mailersto do mail delivery or queueing for network transmission\**..(f\**except when mailing to a file,when.i sendmaildoes the delivery directly..)fThis discipline allows the insertion of new mailersat minimum cost.In this sense .i sendmailresembles the Message Processing Module (MPM)of [Postel79b]..sh 2 "Interfaces to the Outside World".ppThere are three ways.i sendmailcan communicate with the outside world,both in receiving and in sending mail.These are using the conventional UNIXargument vector/return status,speaking SMTP over a pair of UNIX pipes,and speaking SMTP over an interprocess(or) channel..sh 3 "Argument vector/exit status".ppThis technique is the standard UNIX methodfor communicating with the process.A list of recipients is sent in the argument vector,and the message body is sent on the standard input.Anything that the mailer printsis simply collected and sent back to the senderif there were any problems.The exit status from the mailer is collectedafter the message is sent,and a diagnostic is printed if appropriate..sh 3 "SMTP over pipes".ppThe SMTP protocol[Postel82]can be used to run an interactive lock-step interfacewith the mailer.A subprocess is still created,but no recipient addresses are passed to the mailervia the argument list.Instead, they are passed one at a timein commands sent to the processes standard input.Anything appearing on the standard outputmust be a reply codein a special format..sh 3 "SMTP over an IPC connection".ppThis technique is similar to the previous technique,except that it uses a 4.2bsd IPC channel[UNIX83].This method is exceptionally flexiblein that the mailer need not resideon the same machine.It is normally used to connect to a sendmail processon another machine..sh 2 "Operational Description".ppWhen a sender wants to send a message,it issues a request to.i sendmailusing one of the three methods described above..i Sendmailoperates in two distinct phases.In the first phase,it collects and stores the message.In the second phase,message delivery occurs.If there were errors during processingduring the second phase,.i sendmailcreates and returns a new message describing the errorand/or returns an status codetelling what went wrong..sh 3 "Argument processing and address parsing".ppIf.i sendmailis called using one of the two subprocess techniques,the argumentsare first scannedand option specifications are processed.Recipient addresses are then collected,either from the command lineor from the SMTPRCPT command,and a list of recipients is created.Aliases are expanded at this step,including mailing lists.As much validation as possible of the addressesis done at this step:syntax is checked, and local addresses are verified,but detailed checking of host names and addressesis deferred until delivery.Forwarding is also performedas the local addresses are verified..pp.i Sendmailappends each addressto the recipient list after parsing.When a name is aliased or forwarded,the old name is retained in the list,and a flag is set that tells the delivery phaseto ignore this recipient.This list is kept free from duplicates,preventing alias loopsand duplicate messages deliverd to the same recipient,as might occur if a person is in two groups..sh 3 "Message collection".pp.i Sendmailthen collects the message.The message should have a header at the beginning.No formatting requirements are imposed on the messageexcept that they must be lines of text

⌨️ 快捷键说明

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