📄 usenix.me
字号:
.nr si 3n.he 'Mail Systems and Addressing in 4.2bsd''%'.fo 'Version 8.2'USENIX \- Jan 83'Last Mod 11/27/93'.if n .ls 2.+c.(l C.sz 14Mail Systems and Addressingin 4.2bsd.sz.spEric Allman*.sp 0.5.iBritton-Lee, Inc.1919 Addison Street, Suite 105.Berkeley, California 94704..sp 0.5.reric@Berkeley.ARPAucbvax!eric.)l.sp.(l F.ceABSTRACT.sp \n(psuRouting mail through a heterogeneous internet presents many newproblems.Among the worst of these is that of address mapping.Historically, this has been handled on an ad hoc basis.However,this approach has become unmanageable as internets grow..sp \n(psuSendmail acts a unified.q "post office"to which all mail can besubmitted.Address interpretation is controlled by a productionsystem,which can parse both old and new format addresses.Thenew format is.q "domain-based,"a flexible technique that canhandle many common situations.Sendmail is not intended to performuser interface functions..sp \n(psuSendmail will replace delivermail in the Berkeley 4.2 distribution.Several major hosts are now or will soon be running sendmail.This change will affect any users that route mail through a sendmailgateway.The changes that will be user visible are emphasized..)l.sp 2.(f*A considerable part of this workwas done while under the employof the INGRES Projectat the University of California at Berkeley..)f.ppThe mail system to appear in 4.2bsdwill contain a number of changes.Most of these changes are based on the replacement of.i delivermailwith a new module called.i sendmail..i Sendmailimplements a general internetwork mail routing facility,featuring aliasing and forwarding,automatic routing to network gateways,and flexible configuration.Of key interest to the mail system userwill be the changes in the network addressing structure..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 characteristicsand 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 that the route the message takesbe explicitly specified by the sender,simplifying the database update problemsince only adjacent hosts must be enteredinto the system tables,while others use logical addressing,where the sender specifies the location of the recipientbut not how to get there.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, username}triples.Network numbers must be universally agreed upon,and hosts can be assigned locallyon each network.The user-level presentation was changedto 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 the logicalorganization of the address space(user.q ericon host.q ain the Computer Centerat Berkeley)but not the physical networks used(for example, this could go over different networksdepending on whether.q awere on an ethernetor a store-and-forward network)..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 defines some of the termsfrequently left fuzzywhen working in mail systems.Section 2 discusses the design goals for.i sendmail .In section 3,the new address formatsand basic features of.i sendmailare described.Section 4 discusses some of the special problemsof the UUCP network.The differences between.i sendmailand.i delivermailare presented in section 5..sp.(l F.b DISCLAIMER:A number of examplesin this paperuse names of actual peopleand organizations.This is not intendedto imply a commitmentor even an intellectual agreementon the part of these people or organizations.In particular,Bell Telephone Laboratories (BTL),Digital Equipment Corporation (DEC),Lawrence Berkeley Laboratories (LBL),Britton-Lee Incorporated (BLI),and the University of California at Berkeleyare not committed to any of these proposals at this time.Much of this paperrepresents no more thanthe personal opinions of the author..)l.sh 1 "DEFINITIONS".ppThere are four basic conceptsthat must be clearly distinguishedwhen dealing with mail systems:the user (or the user's agent),the user's identification,the user's address,and the route.These are distinguished primarily by their position independence..sh 2 "User and Identification".ppThe user is the being(a person or program)that is creating or receiving a message.An.i agentis an entity operating on behalf of the user \*-such as a secretary who handles my mail.or a program that automatically returns amessage such as.q "I am at the UNICOM conference.".ppThe identification is the tagthat goes along with the particular user.This tag is completely independent of location.For example,my identification is the string.q "Eric Allman,"and this identification does not changewhether I am located at U.C. Berkeley,at Britton-Lee,or at a scientific institute in Austria..ppSince the identification is frequently ambiguous(e.g., there are two.q "Robert Henry" sat Berkeley)it is common to add other disambiguating informationthat is not strictly part of the identification(e.g.,Robert.q "Code Generator"HenryversusRobert.q "System Administrator"Henry)..sh 2 "Address".ppThe address specifies a location.As I move around,my address changes.For example,my address might change from.q eric@Berkeley.ARPAto.q eric@bli.UUCPor.q allman@IIASA.Austriadepending on my current affiliation..ppHowever,an address is independent of the location of anyone else.That is,my address remains the same to everyone who might be sending me mail.For example,a person at MIT and a person at USCcould both send to.q eric@Berkeley.ARPAand have it arrive to the same mailbox..ppIdeally a.q "white pages"service would be provided to map user identificationsinto addresses(for example, see[Solomon81]).Currently this is handled by passing aroundscraps of paperor by calling people on the telephoneto find out their address..sh 2 "Route".ppWhile an address specifies.i whereto find a mailbox,a route specifies.i howto find the mailbox.Specifically,it specifies a pathfrom sender to receiver.As such, the route is potentially differentfor every pair of people in the electronic universe..ppNormally the route is hidden from the userby the software.However,some networks put the burden of determining the routeonto the sender.Although this simplifies the software,it also greatly impairs the usabilityfor most users.The UUCP network is an example of such a network..sh 1 "DESIGN GOALS".ppDesign goals for.i sendmail \**.(f\**This section makes no distinction between.i delivermailand.i sendmail..)finclude:.npCompatibility with the existing mail programs,including Bell version 6 mail,Bell version 7 mail,Berkeley.i Mail[Shoens79],BerkNet mail[Schmidt79],and hopefully UUCP mail[Nowitz78].ARPANET mail[Crocker82]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 withmail 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 Ethernets).This goal requires consideration of the contents of an addressas well as its syntaxin order to determine which gateway to use..npConfiguration information 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 \. 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 "USAGE".sh 2 "Address Formats".ppArguments may be flags or addresses.Flags set various processing options.Following flag arguments,address arguments may be given.Addresses follow the syntax in RFC822[Crocker82]for ARPANETaddress formats.In brief, the format is:.npAnything in parentheses is thrown away(as a comment)..npAnything in angle brackets (\c.q "<\|>" )is preferredover anything else.This rule implements the ARPANET standard that addresses of the form.(buser name <machine-address>.)bwill send to the electronic.q machine-addressrather than the human.q "user name.".npDouble quotes(\ "\ )quote phrases;backslashes quote characters.Backslashes are more powerfulin that they will cause otherwise equivalent phrasesto compare differently \*- for example,.i userand.i"user".rare equivalent,but.i \euseris different from either of them.This might be usedto avoid normal aliasingor duplicate suppression algorithms..ppParentheses, angle brackets, and double quotesmust be properly balanced and nested.The rewriting rules control remaining parsing\**..(f\**Disclaimer: Some special processing is doneafter rewriting local names; see below..)f.ppAlthough old style addresses are still acceptedin most cases,the preferred address formatis based on ARPANET-style domain-based addresses[Su82a].These addresses are based on a hierarchical, logical decompositionof the address space.The addresses are hierarchical in a sensesimilar to the U.S. postal addresses:the messages may first be routed to the correct state,with no initial consideration of the cityor other addressing details.The addresses are logicalin that each step in the hierarchycorresponds to a set of.q "naming authorities"rather than a physical network..ppFor example,the address:.(leric@HostA.BigSite.ARPA.)lwould first look up the domainBigSitein the namespace administrated byARPA.A query could then be sent toBigSitefor interpretation of
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -