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

📄 op.me

📁 早期freebsd实现
💻 ME
📖 第 1 页 / 共 5 页
字号:
command specifying a mailing listwill expand and verify the entire list;a large list on a slow systemmay take more than five minutes\**..(f\**This verification includes looking up every addresswith the name server;this involves network delays,and can in some cases can be considerable..)fI recommend a one hour timeout \*-since this failure is rare,a long timeout is not onerousand may ultimately help reduce network load..ppFor example, the line:.(bOrcommand=25m,datablock=3h.)bsets the server SMTP command timeout to 25 minutesand the input data block timeout to three hours..sh 3 "Message timeouts".ppAfter sitting in the queue for a few days,a message will time out.This is to insure that at least the sender is awareof the inability to send a message.The timeout is typically set to three days.This timeout is set using the.b Toption in the configuration file..ppThe time of submission is set in the queue,rather than the amount of time left until timeout.As a result, you can flush messages that have been hangingfor a short periodby running the queuewith a short message timeout.For example,.(b/usr/\*(SD/sendmail \-oT1d \-q.)bwill run the queueand flush anything that is one day old..ppSince this option is global,and since you can not.i "a priori"know how long another host outside your domain will be down,a five day timeout is recommended.This allows a recipient to fix the problem even if it occursat the beginning of a long weekend.RFC 1123 section 5.3.1.1 says that this parametershould be ``at least 4\-5 days''..ppThe.b Toption can also take a second timeout indicating a time after whicha warning message should be sent;the two timeouts are separated by a slash.For example, the value.(b5d/4h.)bcauses email to fail after five days,but a warning message will be sent after four hours.This should be large enough that the message will have been triedseveral times..sh 2 "Forking During Queue Runs".ppBy setting the.b Yoption,.i sendmailwill fork before each individual messagewhile running the queue.This will prevent.i sendmailfrom consuming large amounts of memory,so it may be useful in memory-poor environments.However, if the.b Yoption is not set,.i sendmailwill keep track of hosts that are down during a queue run,which can improve performance dramatically..ppIf the.b Yoption is set,.i sendmailcan not use connection caching..sh 2 "Queue Priorities".ppEvery message is assigned a priority when it is first instantiated,consisting of the message size (in bytes)offset by the message class times the.q "work class factor"and the number of recipients times the.q "work recipient factor."The priority is used to order the queue.Higher numbers for the priority mean that the message will be processed laterwhen running the queue..ppThe message size is included so that large messages are penalizedrelative to small messages.The message class allows users to send.q "high priority"messages by including a.q Precedence:field in their message;the value of this field is looked up in the.b Plines of the configuration file.Since the number of recipients affects the amount of load a message presentsto the system,this is also included into the priority..ppThe recipient and class factorscan be set in the configuration file using the.b yand.b zoptions respectively.They default to 30000 (for the recipient factor)and 1800(for the class factor).The initial priority is:.EQpri = msgsize - (class times bold z) + (nrcpt times bold y).EN(Remember, higher values for this parameter actually meanthat the job will be treated with lower priority.).ppThe priority of a job can also be adjusted each time it is processed(that is, each time an attempt is made to deliver it)using the.q "work time factor,"set by the.b Zoption.This is added to the priority,so it normally decreases the precedence of the job,on the grounds that jobs that have failed many timeswill tend to fail again in the future.The.b Zoption defaults to 90000..sh 2 "Load Limiting".pp.i Sendmailcan be asked to queue (but not deliver)mail if the system load average gets too highusing the.b xoption.When the load average exceeds the value of the.b xoption,the delivery mode is set to.b q(queue only)if the.i "Queue Factor"(\c.b qoption)divided by the difference in the current load average and the.b xoptionplus oneexceeds the priority of the message \(emthat is, the message is queued iff:.EQpri > { bold q } over { LA - { bold x } + 1 }.ENThe.b qoption defaults to 600000,so each point of load average is worth 600000priority points(as described above)..ppFor drastic cases,the.b Xoption defines a load average at which.i sendmailwill refuseto accept network connections.Locally generated mail(including incoming UUCP mail)is still accepted..sh 2 "Delivery Mode".ppThere are a number of delivery modes that.i sendmailcan operate in,set by the.q dconfiguration option.These modesspecify how quickly mail will be delivered.Legal modes are:.(b.ta 4ni	deliver interactively (synchronously)b	deliver in background (asynchronously)q	queue only (don't deliver).)bThere are tradeoffs.Mode.q ipasses the maximum amount of information to the sender,but is hardly ever necessary.Mode.q qputs the minimum load on your machine,but means that delivery may be delayed for up to the queue interval.Mode.q bis probably a good compromise.However, this mode can cause large numbers of processesif you have a mailer that takes a long time to deliver a message..ppIf you run in mode.q q(queue only)or.q b(deliver in background).i sendmailwill not expand aliases and follow .forward filesupon initial receipt of the mail.This speeds up the response to RCPT commands..sh 2 "Log Level".ppThe level of logging can be set for.i sendmail .The default using a standard configuration table is level 9.The levels are as follows:.nr ii 0.5i.ip 0No logging..ip 1Serious system failures and potential security problems..ip 2Lost communications (network problems) and protocol failures..ip 3Other serious failures..ip 4Minor failures..ip 5Message collection statistics..ip 6Creation of error messages,VRFY and EXPN commands..ip 7Delivery failures (host or user unknown, etc.)..ip 8Successful deliveries..ip 9Messages being deferred(due to a host being down, etc.)..ip 10Database expansion (alias, forward, and userdb lookups)..ip 15Automatic alias database rebuilds..ip 20Logs attempts to run locked queue files.These are not errors,but can be useful to note if your queue appears to be clogged..ip 30Lost locks (only if using lockf instead of flock)..lpAdditionally,values above 64 are reserved for extremely verbose debuggging output.No normal site would ever set these..sh 2 "File Modes".ppThere are a number of filesthat may have a number of modes.The modes depend on what functionality you wantand the level of security you require..sh 3 "To suid or not to suid?".pp.i Sendmailcan safely be madesetuid to root.At the point where it is about to.i exec \|(2)a mailer,it checks to see if the userid is zero;if so,it resets the userid and groupid to a default(set by the.b uand.b goptions).(This can be overriddenby setting the.b Sflag to the mailerfor mailers that are trustedand must be called as root.)However,this will cause mail processingto be accounted(using.i sa \|(8))to rootrather than to the user sending the mail..sh 3 "Should my alias database be writable?".ppAt Berkeleywe have the alias database(/etc/aliases*)mode 644.While this is not as flexible as if the databasewere more 666, it avoids potential security problemswith a globally writable database..ppThe database that.i sendmailactually usedis represented by the two files.i aliases.dirand.i aliases.pag(both in /etc)(or.i aliases.dbif you are running with the new Berkeley database primitives).The mode on these files should match the modeon /etc/aliases.If.i aliasesis writableand theDBMfiles(\c.i aliases.dirand.i aliases.pag )are not,users will be unable to reflect their desired changesthrough to the actual database.However,if.i aliasesis read-onlyand the DBM files are writable,a slightly sophisticated usercan arrange to steal mail anyway..ppIf your DBM files are not writable by the worldor you do not have auto-rebuild enabled(with the.q Doption),then you must be careful to reconstruct the alias databaseeach time you change the text version:.(bnewaliases.)bIf this step is ignored or forgottenany intended changes will also be ignored or forgotten..sh 2 "Connection Caching".ppWhen processing the queue,.i sendmailwill try to keep the last few open connections opento avoid startup and shutdown costs.This only applies to IPC connections..ppWhen trying to open a connectionthe cache is first searched.If an open connection is found, it is probed to see if it is still activeby sending a.sm NOOPcommand.It is not an error if this fails;instead, the connection is closed and reopened..ppTwo parameters control the connection cache.The.b koption defines the number of simultaneous open connectionsthat will be permitted.If it is set to zero,connections will be closed as quickly as possible.The default is one.This should be set as appropriate for your system size;it will limit the amount of system resources that.i sendmailwill use during queue runs..ppThe.b Koption specifies the maximum time that any cached connectionwill be permitted to idle.When the idle time exceeds this valuethe connection is closed.This number should be small(under ten minutes)to prevent you from grabbing too many resourcesfrom other hosts.The default is five minutes..sh 2 "Name Server Access".ppIf your system supports the name server,then the probability is that.i sendmailwill be using it regardless of how you configure.i sendmail .In particular, the system routine.i gethostbyname (3)is used to look up host names,and most vendor versions try some combination of DNS, NIS,and file lookup in /etc/hosts..ppHowever, if you do not have a nameserver configured at all,such as at a UUCP-only site,.i sendmailwill get a.q "connection refused"message when it tries to connect to the name server(either indirectly by calling.i gethostbynameor directly by looking up MX records).If the.b Ioption is set,.i sendmailwill interpret this to mean a temporary failureand will queue the mail for later processing;otherwise, it ignores the name server data.If your name server is running properly,the setting of this option is not relevant;however, it is important that it be set properlyto make error handling work properly..ppThis option also allows you to tweak name server options.The command line takes a series of flags as documented in.i resolver (3)(with the leading.q RES_deleted).Each can be preceded by an optional `+' or `\(mi'.For example, the line.(bOITrue +AAONLY \(miDNSRCH.)bturns on the AAONLY (accept authoritative answers only)and turns off the DNSRCH (search the domain path) options.Most resolver libraries default DNSRCH, DEFNAMES, and RECURSEflags on and all others off.Note the use of the initial ``True'' \*-this is for compatibility with previous versions of.i sendmail ,but is not otherwise necessary..ppVersion level 1 configurationsturn DNSRCH and DEFNAMES off when doing delivery lookups,but leave them on everywhere else.Version 8 of.i sendmailignores them when doing canonification lookups(that is, when using $[ ... $]),and always does the search.If you don't want to do automatic name extension,don't call $[ ... $]..ppThe search rules for $[ ... $] are somewhat different than usual.If the name (that is, the ``...'')has at least one dot, it always tries the unmodified name first.If that fails, it tries the reduced search path,and lastly tries the unmodified name(but only for names without a dot,since names with a dot have already been tried).This allows names such as``utc.CS''to match the site in Czechoslovakiarather than the site in your local Computer Science department.It also prefers A and CNAME records over MX records \*-that is, if it finds an MX record it makes note of it,but keeps looking.This way, if you have a wildcard MX record matching your domain,it will not assume that all names match..sh 2 "Moving the Per-User Forward Files".ppSome sites mount each user's home directoryfrom a local disk on their workstation,so that local access is fast.However, the result is that .forward file lookups are slow.In some cases,mail can even be delivered on machines inappropriatelybecause of a file server being down.The performance can be especially bad if you run the automounter..ppThe.b Joption allows you to set a path of forward files.For example, the config file line.(bOJ/var/forward/$u:$z/.forward.)bwould first look for a file with the same name as the user's loginin /var/forward;if that is not found (or is inaccessible)the file.q \&.forwardin the user's home directory is searched.A truly perverse site could also search by senderby using $r, $s, or $f..ppIf you create a directory such as /var/forward,it should be mode 1777(that is, the sticky bit should be set).Users should create the files mode 644..sh 2 "Free Space".ppOn systems that have the.i statfs (2)system call,you can specify a minimum number of free blocks on the queue filesystemusing the.b boption.If there are fewer than the indicated number of blocks free

⌨️ 快捷键说明

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