op.me

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· ME 代码 · 共 2,890 行 · 第 1/5 页

ME
2,890
字号
.if n .ls 2.he 'Sendmail Installation and Operation Guide''%'.fo 'Version 4.2''Last Mod 7/28/83'.nr si 3n.de $0.(x.in \\$3u*3n.ti -3n\\$2.  \\$1.)x...de $C.(x.in 0\\$1 \\$2.  \\$3.)x...+c.(l C.sz 16.b SENDMAIL.sz 12.sp.b "INSTALLATION AND OPERATION GUIDE".sz 10.sp.rEric AllmanBritton-Lee, Inc..spVersion 4.2.)l.sp 2.pp.i Sendmailimplements a general purpose internetwork mail routing facilityunder the UNIX*.(f*UNIX is a trademark of Bell Laboratories..)foperating system.It is not tied to any one transport protocol \*-its function may be likened to a crossbar switch,relaying messages from one domain into another.In the process,it can do a limited amount of message header editingto put the message into a format that is appropriatefor the receiving domain.All of this is done under the control of a configuration file..ppDue to the requirements of flexibilityfor.i sendmail ,the configuration file can seem somewhat unapproachable.However, there are only a few basic configurationsfor most sites,for which standard configuration files have been supplied.Most other configurationscan be built by adjusting an existing configuration filesincrementally..ppAlthough.i sendmailis intended to runwithout the need for monitoring,it has a number of featuresthat may be used to monitor or adjust the operationunder unusual circumstances.These features are described..ppSection one describes how to do a basic.i sendmailinstallation.Section twoexplains the day-to-day information you should knowto maintain your mail system.If you have a relatively normal site,these two sections should contain sufficient informationfor you to install.i sendmailand keep it happy.Section threedescribes some parameters that may be safely tweaked.Section fourhas information regarding the command line arguments.Section fivecontains the nitty-gritty information about the configurationfile.This section is for masochistsand people who must write their own configuration file.The appendixes give a briefbut detailed explanation of a number of featuresnot described in the rest of the paper..ppThe references in this paper are actually foundin the companion paper.ulSendmail \- An Internetwork Mail Router.This other paper should be read before this manualto gain a basic understandingof how the pieces fit together..sh 1 "BASIC INSTALLATION".ppThere are two basic steps to installing sendmail.The hard part is to build the configuration table.This is a file that sendmail reads when it starts upthat describes the mailers it knows about,how to parse addresses,how to rewrite the message header,and the settings of various options.Although the configuration table is quite complex,a configuration can usually be builtby adjusting an existing off-the-shelf configuration.The second part is actually doing the installation,i.e., creating the necessary files, etc..ppThe remainder of this section will describe the installation of sendmailassuming you can use one of the existing configurationsand that the standard installation parameters are acceptable.All pathnames and examplesare given from the root of the.i sendmailsubtree..sh 2 "Off-The-Shelf Configurations".ppThe configuration filesare all in the subdirectory.i cfof the sendmail directory.The ones used at Berkeley are in.i m4 \|(1)format;files with names ending.q .m4are.i m4include files,while files with names ending.q .mcare the master files.Files with names ending.q .cfare the.i m4processed versions of the corresponding.q .mcfile..ppTwo off the shelf configuration files are suppliedto handle the basic cases:.i cf/arpaproto.cffor Arpanet (TCP) sitesand.i cf/uucpproto.cffor UUCP sites.These are.i notin.i m4format.The file you need should be copied to a file with the same nameas your system,e.g.,.(bcp uucpproto.cf ucsfcgl.cf.)bThis fileis now ready for installation as.i /usr/lib/sendmail.cf ..sh 2 "Installation Using the Makefile".ppA makefile exists in the root of the.i sendmaildirectory that will do all of these stepsfor a 4.2bsd system.It may have to be slightly tailoredfor use on other systems..ppBefore using this makefile,you should already have created your configuration fileand left it in the file.q cf/\fIsystem\fP.cfwhere.i systemis the name of your system(i.e., what is returned by.i hostname \|(1)).If you do not have.i hostnameyou can use the declaration.q HOST=\fIsystem\fPon the.i make \|(1)command line.You should also examine the file.i md/config.m4and change the.i m4macros there to reflect any libraries and compilation flagsyou may need..ppThe basic installation procedure is to type:.(bmakemake install.)bin the root directory of the.i sendmaildistribution.This will make all binariesand install them in the standard places.The second.i makecommand must be executed as the superuser (root)..sh 2 "Installation by Hand".ppAlong with building a configuration file,you will have to install the.i sendmailstartup into your UNIX system.If you are doing this installationin conjunction with a regular Berkeley UNIX install,these steps will already be complete.Many of these steps will have to be executed as the superuser (root)..sh 3 "lib/libsys.a".ppThe library in lib/libsys.acontains some routines that should in some sensebe part of the system library.These are the system logging routinesand the new directory access routines(if required).If you are not running the new 4.2bsd directory codeand do not have the compatibility routines installed in your system library,you should execute the commands:.(bcd libmake ndir.)bThis will compile and install the 4.2 compatibility routinesin the library.You should then type:.(bcd lib      # if requiredmake.)bThis will recompile and fill the library..sh 3 "/usr/lib/sendmail".ppThe binary for sendmail is located in /usr/lib.There is a version available in the source directorythat is probably inadequate for your system.You should plan on recompiling and installing the entire system:.(bcd srcrm \-f *.omakecp sendmail /usr/lib.)b.sh 3 "/usr/lib/sendmail.cf".ppThe configuration filethat you created earliershould be installed in /usr/lib/sendmail.cf:.(bcp cf/\fIsystem\fP.cf /usr/lib/sendmail.cf.)b.sh 3 "/usr/ucb/newaliases".ppIf you are running delivermail,it is critical that the.i newaliasescommand be replaced.This can just be a link to.i sendmail :.(brm \-f /usr/ucb/newaliasesln /usr/lib/sendmail /usr/ucb/newaliases.)b.sh 3 "/usr/lib/sendmail.cf".ppThe configuration file must be installed in /usr/lib.This is described above..sh 3 "/usr/spool/mqueue".ppThe directory.i /usr/spool/mqueueshould be created to hold the mail queue.This directory should be mode 777unless.i sendmailis run setuid,when.i mqueueshould be owned by the sendmail ownerand mode 755..sh 3 "/usr/lib/aliases*".ppThe system aliases are held in three files.The file.q /usr/lib/aliasesis the master copy.A sample is given in.q lib/aliaseswhich includes some aliases which.i mustbe defined:.(bcp lib/aliases /usr/lib/aliases.)bYou should extend this file with any aliases that are apropos to your system..ppNormally.i sendmaillooks at a version of these files maintained by the.i dbm \|(3)routines.These are stored in.q /usr/lib/aliases.dirand.q /usr/lib/aliases.pag.These can initially be created as empty files,but they will have to be initialized promptly.These should be mode 666 if you are running a reasonably relaxed system:.(bcp /dev/null /usr/lib/aliases.dircp /dev/null /usr/lib/aliases.pagchmod 666 /usr/lib/aliases.*newaliases.)b.sh 3 "/usr/lib/sendmail.fc".ppIf you intend to install the frozen version of the configuration file(for quick startup)you should create the file /usr/lib/sendmail.fcand initialize it.This step may be safely skipped..(bcp /dev/null /usr/lib/sendmail.fc/usr/lib/sendmail \-bz.)b.sh 3 "/etc/rc".ppIt will be necessary to start up the sendmail daemon when your system reboots.This daemon performs two functions:it listens on the SMTP socket for connections(to receive mail from a remote system)and it processes the queue periodicallyto insure that mail gets delivered when hosts come up..ppAdd the following lines to.q /etc/rc(or.q /etc/rc.localas appropriate)in the area where it is starting up the daemons:.(bif [ \-f /usr/lib/sendmail ]; then	(cd /usr/spool/mqueue; rm \-f [lnx]f*)	/usr/lib/sendmail \-bd \-q30m &	echo \-n ' sendmail' >/dev/consolefi.)bThe.q cdand.q rmcommands insure that all lock files have been removed;extraneous lock files may be left aroundif the system goes down in the middle of processing a message.The line that actually invokes.i sendmailhas two flags:.q \-bdcauses it to listen on the SMTP port,and.q \-q30mcauses it to run the queue every half hour..ppIf you are not running a version of UNIXthat supports Berkeley TCP/IP,do not include the.b \-bdflag..sh 3 "/usr/lib/sendmail.hf".ppThis is the help file used by the SMTP.b HELPcommand.It should be copied from.q lib/sendmail.hf :.(bcp lib/sendmail.hf /usr/lib.)b.sh 3 "/usr/lib/sendmail.st".ppIf you wish to collect statisticsabout your mail traffic,you should create the file.q /usr/lib/sendmail.st :.(bcp /dev/null /usr/lib/sendmail.stchmod 666 /usr/lib/sendmail.st.)bThis file does not grow.It is printed with the program.q aux/mailstats..sh 3 "/etc/syslog".ppYou may want to run the.i syslogprogram(to collect log information about sendmail).This program normally resides in.i /etc/syslog,with support files.i /etc/syslog.confand.i /etc/syslog.pid .The program is located in the.i auxsubdirectory of the.i sendmaildistribution.The file.i /etc/syslog.confdescribes the file(s) that sendmail will log in.For a complete description of syslog,see the manual page for.i syslog \|(8)(located in.i sendmail/docon the distribution)..sh 3 "/usr/ucb/newaliases".ppIf.i sendmailis invoked as.q newaliases,it will simulate the.b \-biflag(i.e., will rebuild the alias database;see below).This should be a link to /usr/lib/sendmail..sh 3 "/usr/ucb/mailq".ppIf.i sendmailis invoked as.q mailq,it will simulate the.b \-bpflag(i.e.,.i sendmailwill print the contents of the mail queue;see below).This should be a link to /usr/lib/sendmail..sh 1 "NORMAL OPERATIONS".sh 2 "Quick Configuration Startup".ppA fast version of the configuration filemay be set up by using the.b \-bzflag:.(b/usr/lib/sendmail \-bz.)bThis creates the file.i /usr/lib/sendmail.fc(\c.q "frozen configuration" ).This file is an image of.i sendmail 'sdata space after reading in the configuration file.If this file exists,it is used instead of.i /usr/lib/sendmail.cf.i sendmail.fcmust be rebuilt manually every time.i sendmail.cfis changed..ppThe frozen configuration file will be ignoredif a.b \-Cflag is specifiedor if sendmail detects that it is out of date.However, the heuristics are not strongso this should not be trusted..sh 2 "The System Log".ppThe system log is supported by the.i syslog \|(8)program..sh 3 "Format".ppEach line in the system logconsists of a timestamp,the name of the machine that generated it(for logging from several machinesover the ethernet),the word.q sendmail: ,and a message..sh 3 "Levels".ppIf you have.i syslog \|(8)or an equivalent installed,you will be able to do logging.There is a large amount of information that can be logged.The log is arranged as a succession of levels.At the lowest levelonly extremely strange situations are logged.At the highest level,even the most mundane and uninteresting eventsare recorded for posterity.As a convention,log levels under tenare considered.q useful;log levels above tenare usually for debugging purposes..ppA complete description of the log levelsis given in section 4.3..sh 2 "The Mail Queue".ppThe mail queue should be processed transparently.However, you may find that manual intervention is sometimes necessary.For example,if a major host is down for a period of timethe queue may become clogged.Although sendmail ought to recover gracefully when the host comes up,you may find performance unacceptably bad in the meantime..sh 3 "Printing the queue".ppThe contents of the queue can be printedusing the.i mailqcommand(or by specifying the.b \-bpflag to sendmail):.(bmailq.)bThis will produce a listing of the queue id's,the size of the message,the date the message entered the queue,and the sender and recipients..sh 3 "Format of queue files".ppAll queue files have the form\fIx\fP\|\fBf\fP\fIAA99999\fPwhere.i AA99999is the.i idfor this fileand the.i xis a type.The types are:.ip dThe data file.The message body (excluding the header) is kept in this file..ip lThe lock file.If this file exists,the job is currently being processed,and a queue run will not process the file.For that reason,an extraneous.b lffile can cause a job to apparently disappear

⌨️ 快捷键说明

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