📄 op.ps
字号:
%%Page: 11 6%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Bold@0 SF(Sendmail Installation and Operation Guide)72 60 Q(SMM:08-11)452.9 60 Q/F1 10/Times-Roman@0 SF(if [ \255f /usr/sbin/sendmail \255a \255f /etc/sendmail.cf ]; then)157 96 Q(\(cd /v)193 108 Q(ar/spool/mqueue; rm \255f [lnx]f*\))-.25 E(/usr/sbin/sendmail \255bd \255q30m &)193 120 Q(echo \255n ' sendmail' >/de)193132 Q(v/console)-.25 E<8c>157 144 Q .174(The \231cd\232 and \231rm\232 commands insure that all lock \214les ha)117160.2 R .473 -.15(ve b)-.2 H .173(een remo).15 F -.15(ve)-.15 G .173(d; e).15 F.173(xtraneous lock \214les)-.15 F .004(may be left around if the system goes do)117 172.2 R .005(wn in the middle of processing a message.)-.25 F .005(The line that)5.005 F2.294(actually in)117 184.2 R -.2(vo)-.4 G -.1(ke).2 G(s).1 E/F2 10/Times-Italic@0 SF(sendmail)4.794 E F1 2.294(has tw)4.794 F 4.794<6f8d>-.1 G2.293(ags: \231\255bd\232 causes it to listen on the SMTP port, and)272.94184.2 R(\231\255q30m\232 causes it to run the queue e)117 196.2 Q -.15(ve)-.25G(ry half hour).15 E(.)-.55 E .378(Some people use a more comple)142 212.4 R2.879(xs)-.15 G .379(tartup script, remo)285.209 212.4 R .379(ving zero length qf \214les and df \214les)-.15 F(for which there is no qf \214le.)117 224.4 Q -.15(Fo)5 G 2.5(re).15 G(xample:)253.9 224.4 Q 2.5(#r)157 240.6 S(emo)167.83 240.6 Q .3 -.15(ve z)-.15 H(ero length qf \214les).15 E(for qf)157 252.6 Q(\214le in qf*)-.25 E(do)157264.6 Q(if [ \255r $qf)193 276.6 Q(\214le ])-.25 E(then)193 288.6 Q(if [ ! \255s $qf)229 300.6 Q(\214le ])-.25 E(then)229 312.6 Q(echo \255n " <zero: $qf)265 324.6 Q(\214le>" > /de)-.25 E(v/console)-.25 E(rm \255f $qf)265 336.6 Q(\214le)-.25 E<8c>229 348.6 Q<8c>193 360.6 Q(done)157372.6 Q 2.5(#r)157 384.6 S(ename tf \214les to be qf if the qf does not e)167.83 384.6 Q(xist)-.15 E(for tf)157 396.6 Q(\214le in tf*)-.25 E(do)157 408.6Q(qf)193 420.6 Q(\214le=`echo $tf)-.25 E(\214le | sed ')-.25 E(s/t/q/'`)-.55 E(if [ \255r $tf)193 432.6 Q(\214le \255a ! \255f $qf)-.25 E(\214le ])-.25 E(then)193 444.6 Q(echo \255n " <reco)229 456.6 Q -.15(ve)-.15 G(ring: $tf).15 E(\214le>" > /de)-.25 E(v/console)-.25 E(mv $tf)229 468.6 Q(\214le $qf)-.25 E(\214le)-.25 E(else)193 480.6 Q(echo \255n " <e)229 492.6 Q(xtra: $tf)-.15 E(\214le>" > /de)-.25 E(v/console)-.25 E(rm \255f $tf)229 504.6 Q(\214le)-.25 E<8c>193 516.6 Q(done)157 528.6 Q 2.5(#r)157 540.6 S(emo)167.83 540.6 Q .3 -.15(ve d)-.15 H 2.5<668c>.15 G(les with no corresponding qf \214les)213.08 540.6 Q(for df)157 552.6 Q(\214le in df*)-.25 E(do)157 564.6 Q(qf)193 576.6 Q(\214le=`echo $df)-.25 E(\214le | sed ')-.25 E(s/d/q/'`)-.55 E(if [ \255r $df)193 588.6 Q(\214le \255a ! \255f $qf)-.25 E(\214le ])-.25 E(then)193 600.6 Q(echo \255n " <incomplete: $df)229 612.6 Q(\214le>" > /de)-.25 E(v/console)-.25E(mv $df)229 624.6 Q(\214le `echo $df)-.25 E(\214le | sed ')-.25 E(s/d/D/'`)-.55 E<8c>193 636.6 Q(done)157 648.6 Q 2.5(#a)157 660.6 S(nnounce \214les that ha)168.94 660.6 Q .3 -.15(ve b)-.2 H(een sa).15 E -.15(ve)-.2 G 2.5(dd).15 G(uring disaster reco)314.32 660.6 Q -.15(ve)-.15 G(ry).15E(for xf)157 672.6 Q(\214le in [A-Z]f*)-.25 E(do)157 684.6 Q(echo \255n " <panic: $xf)193 696.6 Q(\214le>" > /de)-.25 E(v/console)-.25 E(done)157 708.6 Q EP%%Page: 12 7%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Bold@0 SF 193.36(SMM:08-12 Sendmail)72 60 R(Installation and Operation Guide)2.5 E/F1 10/Times-Roman@0 SF .756(If you are not running a v)142 96 R .755(ersion of UNIX that supports Berk)-.15 F(ele)-.1 E 3.255(yT)-.15 G(CP/IP)416.725 96 Q 3.255(,d)-1.11 G 3.255(on)450.27 96 S .755(ot include)463.525 96 R(the)117 108 Q F0(\255bd)2.5 E F1(\215ag.)2.5 E F0 2.5(1.3.7. /usr/lib/sendmail.hf)102 132 R F1 2.078(This is the help \214le used by the SMTP)142 148.2 R F0(HELP)4.578 E F1 4.578(command. It)4.578 F 2.078(should be copied from)4.578 F(\231lib/sendmail.hf\232:)117 160.2 Q(cp lib/sendmail.hf /usr/lib)157 176.4 Q(The actual path of this \214le is de\214ned in the)117 192.6 Q F0(H)2.5 E F1(option of the)2.5 E/F2 10/Times-Italic@0 SF(sendmail.cf)2.5 E F1(\214le.)2.5 EF0 2.5(1.3.8. /etc/sendmail.st)102 216.6 R F1 3.04(If you wish to collect statistics about your mail traf)142 232.8 R 3.04(\214c, you should create the \214le)-.25 F(\231/etc/sendmail.st\232:)117 244.8Q(cp /de)157 261 Q(v/null /etc/sendmail.st)-.25 E(chmod 666 /etc/sendmail.st)157 273 Q .715(This \214le does not gro)117 289.2 R 4.516 -.65(w. I)-.25 H3.216(ti).65 G 3.216(sp)231.502 289.2 S .716(rinted with the program \231mailstats/mailstats.c.)243.608 289.2 R 5.716<9a54>-.7 G .716(he actual path)447.028 289.2 R(of this \214le is de\214ned in the)117 301.2 Q F0(S)2.5 E F1(option of the)2.5 E F2(sendmail.cf)2.5 E F1(\214le.)2.5 E F0 2.5(1.3.9. /usr/bin/newaliases)102 325.2 R F1(If)142 341.4 Q F2(sendmail)3.256 E F1 .756(is in)3.256 F -.2(vo)-.4 G -.1(ke).2 G 3.256(da).1 G3.256<7399>240.424 341.4 S(ne)252.01 341.4 Q -.1(wa)-.25 G(liases,).1 E 3.255<9a69>-.7 G 3.255(tw)307.255 341.4 S .755(ill simulate the)320.51 341.4 R F0(\255bi)3.255 E F1 .755(\215ag \(i.e., will reb)3.255 F .755(uild the)-.2 F(alias database; see belo)117 353.4 Q 2.5(w\). This)-.25 F(should be a link to /usr/sbin/sendmail.)2.5 E F0 2.5(1.3.10. /usr/bin/mailq)102 377.4 R F1(If)142 393.6 Q F2(sendmail)3.439 E F1 .939(is in)3.439 F -.2(vo)-.4 G -.1(ke).2 G 3.439(da).1 G 3.439<7399>241.156 393.6 S(mailq,)252.925 393.6Q 3.439<9a69>-.7 G 3.439(tw)288.164 393.6 S .939(ill simulate the)301.603 393.6R F0(\255bp)3.439 E F1 .94(\215ag \(i.e.,)3.44 F F2(sendmail)3.44 E F1 .94(will print)3.44 F(the contents of the mail queue; see belo)117 405.6 Q 2.5(w\). This)-.25 F(should be a link to /usr/sbin/sendmail.)2.5 E F0 2.5(2. NORMAL)72 429.6 R(OPERA)2.5 E(TIONS)-.95 E 2.5(2.1. The)87 453.6 R(System Log)2.5 E F1 1.511(The system log is supported by the)127 469.8 R F2(syslo)4.011 E(gd)-.1 E F1 1.511(\(8\) program.)1.666 F 1.511(All messages from)6.511 F F2(sendmail)4.011 E F1(are)4.011 E(logged under the)102 481.8 Q/F3 9/Times-Roman@0 SF(LOG_MAIL)2.5 E F1 -.1(fa)2.5 G(cility).1 E(.)-.65 E F0 2.5(2.1.1. F)102 505.8 R(ormat)-.25 E F1 .574(Each line in the syste\m log consists of a timestamp, the name of the machine that gener)142 522 R(-)-.2 E .849(ated it \(for logging from se)117 534 R -.15(ve)-.25 G .849(ral machines o).15 F -.15(ve)-.15 G 3.349(rt).15 G .848(he local area netw)316.942 534 R .848(ork\), the w)-.1 F .848(ord \231sendmail:\232,)-.1 F(and a message.)117 546 Q F0 2.5(2.1.2. Le)102 570 R -.1(ve)-.15 G(ls).1 E F1.204(If you ha)142 586.2 R -.15(ve)-.2 G F2(syslo)2.854 E(gd)-.1 E F1 .204(\(8\) or an equi)1.666 F -.25(va)-.25 G .205(lent installed, you will be able to do logging.).25 F .205(There is)5.205 F2.788(al)117 598.2 S(ar)127.008 598.2 Q .287(ge amount of information that can be logged.)-.18 F .287(The log is arranged as a succession of le)5.287 F -.15(ve)-.25 G(ls.).15 E .65(At the lo)117 610.2 R .65(west le)-.25 F -.15(ve)-.25 G 3.15(lo).15 G .65(nly e)201.72 610.2 R .651(xtremely strange situations are logged.)-.15 F .651(At the highest le)5.651 F -.15(ve)-.25 G .651(l, e).15 F -.15(ve)-.25 G 3.151(nt).15 G(he)494.56 610.2 Q .826(most mundane and uninteresting e)117 622.2 R-.15(ve)-.25 G .825(nts are recorded for posterity).15 F 5.825(.A)-.65 G 3.325(sac)400.27 622.2 S(on)419.69 622.2 Q -.15(ve)-.4 G .825(ntion, log le).15 F-.15(ve)-.25 G(ls).15 E .2(under ten are considered generally \231useful;\232 log le)117 634.2 R -.15(ve)-.25 G .201(ls abo).15 F .501 -.15(ve 6)-.15 H 2.701(4a).15 G .201(re reserv)381.566 634.2 R .201(ed for deb)-.15 F .201(ugging pur)-.2 F(-)-.2 E 2.5(poses. Le)117 646.2 R -.15(ve)-.25 G(ls from 11\25564 are reserv).15 E(ed for v)-.15 E(erbose information that some sites might w)-.15 E(ant.)-.1 E2.5(Ac)142 662.4 S(omplete description of the log le)156.16 662.4 Q -.15(ve)-.25 G(ls is gi).15 E -.15(ve)-.25 G 2.5(ni).15 G 2.5(ns)340.35 662.4 S(ection 4.6.)351.74 662.4 Q F0 2.5(2.2. The)87 686.4 R(Mail Queue)2.5 E F1 .263(The mail queue should be processed transparently)127 702.6 R 5.262(.H)-.65 G-.25(ow)342.868 702.6 S -2.15 -.25(ev e).25 H 1.062 -.4(r, y).25 H .262(ou may \214nd that manual inter).4 F(-)-.2 E -.15(ve)102 714.6 S .081(ntion is sometimes necessary).15 F 5.081(.F)-.65 G .081(or e)240.254 714.6 R.081(xample, if a major host is do)-.15 F .081(wn for a period of time the queue)-.25 F EP%%Page: 13 8%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Bold@0 SF(Sendmail Installation and Operation Guide)72 60 Q(SMM:08-13)452.9 60 Q/F1 10/Times-Roman@0 SF .268(may become clogged.)102 96 R(Although)5.268 E/F2 10/Times-Italic@0 SF(sendmail)2.768 E F1 .268(ought to reco)2.768 F -.15(ve)-.15 G 2.768(rg).15 G .268(racefully when the host comes up, you)348.254 96 R(may \214nd performance unacceptably bad in the meantime.)102 108 Q F0 2.5(2.2.1. Printing)102 132 R(the queue)2.5 E F1 .526(The contents of the queue can be printed using the)142 148.2 R F2(mailq)3.026E F1 .526(command \(or by specifying the)3.026 F F0(\255bp)117 160.2 Q F1(\215ag to)2.5 E F2(sendmail)2.5 E F1(\):)A(mailq)157 176.4 Q 1.673(This will produce a listing of the queue id')117 192.6 R 1.673(s, the size of the message, the date the message)-.55 F(entered the queue, and the sender and recipients.)117 204.6 Q F0 2.5(2.2.2. F)102 228.6 R(or)-.25 E(cing the queue)-.18 E F2(Sendmail)142 244.8 Q F1 1.137(should run the queue automatically at interv)3.637 F 3.638(als. The)-.25 F1.138(algorithm is to read and)3.638 F .355(sort the queue, and then to attempt to process all jobs in order)117 256.8 R5.355(.W)-.55 G .355(hen it attempts to run the job,)384.37 256.8 R F2(sendmail)117 268.8 Q F1(\214rst checks to see if the job is lock)2.5 E 2.5(ed. If)-.1 F(so, it ignores the job)2.5 E(.)-.4 E .338(There is no attempt to insure that only one queue processor e)142 285 R .338(xists at an)-.15 F 2.838(yt)-.15 G .339(ime, since there)440.282 285 R .095(is no guarantee that a job cannot tak)117 297 R 2.595(ef)-.1 G(ore)272.07 297Q -.15(ve)-.25 G 2.595(rt).15 G 2.595(op)302.585 297 S .094(rocess \(ho)315.18297 R(we)-.25 E -.15(ve)-.25 G -.4(r,).15 G F2(sendmail)2.994 E F1 .094(does include heuris-)2.594 F 1.086(tics to try to abort jobs that are taking absurd amounts of time; technically)117 309 R 3.587(,t)-.65 G 1.087(his violates RFC)435.146 309 R .462(821, b)117321 R .461(ut is blessed by RFC 1123\).)-.2 F .461(Due to the locking algorithm, it is impossible for one job to)5.461 F 1.086(freeze the entire queue.)117 333 R(Ho)6.086 E(we)-.25 E -.15(ve)-.25 G 1.886-.4(r, a).15 H 3.586(nu).4 G(ncooperati)279.346 333 Q 1.386 -.15(ve r)-.25 H1.086(ecipient host or a program recipient that).15 F(ne)117 345 Q -.15(ve)-.25G 3.351(rr).15 G .851(eturns can accumulate man)145.491 345 R 3.351(yp)-.15 G.851(rocesses in your system.)269.825 345 R(Unfortunately)5.851 E 3.351(,t)-.65G .85(here is no com-)439.52 345 R(pletely general w)117 357 Q(ay to solv)-.1 E2.5(et)-.15 G(his.)234.23 357 Q .082(In some cases, you may \214nd that a major host going do)142 373.2 R .083(wn for a couple of days may create)-.25 F 2.925(ap)117 385.2 S(rohibiti)129.365 385.2 Q -.15(ve)-.25 G .425(ly lar).15 F .425(ge queue.)-.18 F .424(This will result in)5.425 F F2(sendmail)2.924 E F1 .424(spending an inordinate amount of time)2.924 F 1.084(sorting the queue.)117397.2 R 1.084(This situation can be \214x)6.084 F 1.084(ed by mo)-.15 F 1.085(ving the queue to a temporary place and)-.15 F .023(creating a ne)117 409.2 R2.523(wq)-.25 G 2.523(ueue. The)182.629 409.2 R .022(old queue can be run later when the of)2.523 F .022(fending host returns to service.)-.25 F 1.6 -.8(To d)142 425.4 T 2.5(ot).8 G(his, it is acceptable to mo)170.09 425.4 Q .3 -.15(ve t)-.15 H(he entire queue directory:).15 E(cd /v)157 441.6 Q(ar/spool)-.25 E(mv mqueue omqueue; mkdir mqueue; chmod 700 mqueue)157 453.6 Q -1.1(Yo)117469.8 S 2.708(us)1.1 G .208(hould then kill the e)139.718 469.8 R .209(xisting daemon \(since it will still be processing in the old queue direc-)-.15 F(tory\) and create a ne)117 481.8 Q 2.5(wd)-.25 G(aemon.)213.1 481.8 Q1.6 -.8(To r)142 498 T(un the old mail queue, run the follo).8 E(wing command:)-.25 E(/usr/sbin/sendmail \255oQ/v)157 514.2 Q(ar/spool/omqueue \255q)-.25 E(The)117 530.4 Q F0(\255oQ)2.868 E F1 .367(\215ag speci\214es an alternate queue directory and the)2.868 F F0<ad71>2.867E F1 .367(\215ag says to just run e)2.867 F -.15(ve)-.25 G .367(ry job in).15 F.593(the queue.)117 542.4 R .593(If you ha)5.593 F .893 -.15(ve a t)-.2 H(endenc).15 E 3.093(yt)-.15 G -2.1 -.25(ow a)263.111 542.4 T .593(rd v).25 F-.1(oy)-.2 G .593(eurism, you can use the).1 F F0<ad76>3.094 E F1 .594(\215ag to w)3.094 F .594(atch what is)-.1 F(going on.)117 554.4 Q(When the queue is \214nally emptied, you can remo)142 570.6 Q .3 -.15(ve t)-.15 H(he directory:).15 E(rmdir /v)157 586.8 Q(ar/spool/omqueue)-.25 E F0 2.5(2.3. The)87 615 R(Alias Database)2.5 E F1 .361(The alias database e)127 631.2R .361(xists in tw)-.15 F 2.861(of)-.1 G 2.861(orms. One)261.116 631.2 R .361(is a te)2.861 F .36(xt form, maintained in the \214le)-.15 F F2(/etc/aliases.)2.86 E F1(The aliases are of the form)102 643.2 Q(name: name1, name2, ...)142659.4 Q(Only local names may be aliased; e.g.,)102 675.6 Q(eric@prep.ai.MIT)142691.8 Q(.EDU: eric@CS.Berk)-.74 E(ele)-.1 E -.65(y.)-.15 G(EDU).65 E .348(will not ha)102 708 R .648 -.15(ve t)-.2 H .348(he desired ef).15 F 2.849(fect. Aliases)-.25 F .349(may be continued by starting an)2.849 F 2.849(yc)-.15 G .349(ontinuation lines with a)408.783 708 R(space or a tab)102 720 Q 5(.B)-.4 G(lank lines and lines be)170.47 720 Q(ginning with a sharp sign \(\231#\232\) are comments.)-.15 E EP%%Page: 14 9%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Bold@0 SF 193.36(SMM:08-14 Sendmail)72 60 R(Installation and Operation Guide)2.5 E/F1 10/Times-Roman@0 SF 1.593(The second form is processed by the)127 96 R/F2 10/Times-Italic@0 SF(dbm)4.093E F1 1.593(\(3\) \(or)1.666 F F2(db)4.093 E F1 1.593(\(3\)\) library)1.666 F6.593(.T)-.65 G 1.593(his form is in the \214les)409.085 96 R F2(/etc/aliases.dir)102 108 Q F1(and)3.028 E F2(/etc/aliases.pa)3.028 E -.15(g.)-.1 G F1 .528(This is the form that)5.678 F F2(sendmail)3.029 E F1 .529(actually uses to resolv)3.029 F 3.029(ea)-.15 G(liases.)479.28 108 Q
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -