📄 op.me
字号:
while another process is rebuilding it,or the process rebuilding the database dies(due to being killed or a system crash)before completing the rebuild..ppSendmail has two techniques to try to relieve these problems.First, it ignores interrupts while rebuilding the database;this avoids the problem of someone aborting the processleaving a partially rebuilt database.Second,at the end of the rebuildit adds an alias of the form.(b@: @.)b(which is not normally legal).Before.i sendmailwill access the database,it checks to insure that this entry exists\**..(f\**The.q aoption is required in the configurationfor this action to occur.This should normally be specified..)f.sh 3 "List owners".ppIf an error occurs on sending to a certain address,say.q \fIx\fP ,.i sendmailwill look for an aliasof the form.q owner-\fIx\fPto receive the errors.This is typically usefulfor a mailing listwhere the submitter of the listhas no control over the maintenance of the list itself;in this case the list maintainer would be the owner of the list.For example:.(bunix-wizards: eric@ucbarpa, wnj@monet, nosuchuser, sam@matisseowner-unix-wizards: eric@ucbarpa.)bwould cause.q eric@ucbarpato get the error that will occurwhen someone sends tounix-wizardsdue to the inclusion of.q nosuchuseron the list..ppList owners also cause the envelope sender address to be modified.The contents of the owner alias are used if they point to a single user,otherwise the name of the alias itself is used.For this reason, and to obey Internet conventions,a typical scheme would be:.(blist: some, set, of, addresseslist-request: list-admin-1, list-admin-2, ...owner-list: list-request.)b.sh 2 "User Information Database".ppIf you have a version of.i sendmailwith the user information databasecompiled in,and you have specified one or more databases using the.b Uoption,the databases will be searched for a.i user :maildropentry.If found, the mail will be sent to the specified address..ppIf the first token passed to user part of the.q localmailer is an at sign,the at sign will be stripped offand this step will be skipped..sh 2 "Per-User Forwarding (.forward Files)".ppAs an alternative to the alias database,any user may put a file with the name.q .forwardin his or her home directory.If this file exists,.i sendmailredirects mail for that userto the list of addresses listed in the .forward file.For example, if the home directory for user.q mckusickhas a .forward file with contents:.(bmckusick@erniekirk@calder.)bthen any mail arriving for.q mckusickwill be redirected to the specified accounts..ppActually, the configuration file defines a sequence of filenames to check.By default, this is the user's .forward file,but can be defined to be more generally using the.b Joption.If you change this,you will have to inform your user base of the change;\&.forward is pretty well incorporated into the collective subconscious..sh 2 "Special Header Lines".ppSeveral header lines have special interpretationsdefined by the configuration file.Others have interpretations built into.i sendmailthat cannot be changed without changing the code.These builtins are described here..sh 3 "Return-Receipt-To:".ppIf this header is sent,a message will be sent to any specified addresseswhen the final delivery is complete,that is,when successfully delivered to a mailer with the.b lflag (local delivery) set in the mailer descriptor\**..(f\**Some sites disable this header,and other (non-\c.i sendmail )systems do not implement it.Do not assume that a failure to get a return receiptmeans that the mail did not arrive.Also, do not assume that getting a return receiptmeans that the mail has been read;it just means that the message has been deliveredto the recipient's mailbox..)fThis header can be disabled with the.q noreceiptsprivacy flag..sh 3 "Errors-To:".ppIf errors occur anywhere during processing,this header will cause error messages to go tothe listed addresses.This is intended for mailing lists..ppThe Errors-To: header was created in the bad old dayswhen UUCP didn't understand the distinction between an envelope and a header;this was a hack to provide what should now be passedas the envelope sender address.It should go away.It is only used if the.b loption is set..sh 3 "Apparently-To:".ppIf a message comes in with no recipients listed in the message(in a To:, Cc:, or Bcc: line)then.i sendmailwill add an.q "Apparently-To:"header line for any recipients it is aware of.This is not put in as a standard recipient lineto warn any recipients that the list is not complete..ppAt least one recipient line is required under RFC 822..sh 2 "IDENT Protocol Support".pp.i Sendmailsupports the IDENT protocol as defined in RFC 1413.Although this enhances identificationof the author of an email messageby doing a ``call back'' to the originating system to includethe owner of a particular TCP connectionin the audit trailit is in no sense perfect;a determined forger can easily spoof the IDENT protocol.The following description is excerpted from RFC 1413:.ba +5.lp6. Security Considerations.lpThe information returned by this protocol is at most as trustworthyas the host providing it OR the organization operating the host. Forexample, a PC in an open lab has few if any controls on it to preventa user from having this protocol return any identifier the userwants. Likewise, if the host has been compromised the informationreturned may be completely erroneous and misleading..lpThe Identification Protocol is not intended as an authorization oraccess control protocol. At best, it provides some additionalauditing information with respect to TCP connections. At worst, itcan provide misleading, incorrect, or maliciously incorrectinformation..lpThe use of the information returned by this protocol for other thanauditing is strongly discouraged. Specifically, using IdentificationProtocol information to make access control decisions - either as theprimary method (i.e., no other checks) or as an adjunct to othermethods may result in a weakening of normal host security..lpAn Identification server may reveal information about users,entities, objects or processes which might normally be consideredprivate. An Identification server provides service which is a roughanalog of the CallerID services provided by some phone companies andmany of the same privacy considerations and arguments that apply tothe CallerID service apply to Identification. If you wouldn't run a"finger" server due to privacy considerations you may not want to runthis protocol..ba.sh 1 "ARGUMENTS".ppThe complete list of arguments to.i sendmailis described in detail in Appendix A.Some important arguments are described here..sh 2 "Queue Interval".ppThe amount of time between forking a processto run through the queueis defined by the.b \-qflag.If you run in mode.b for.b athis can be relatively large,since it will only be relevantwhen a host that was down comes back up.If you run in.b qmodeit should be relatively short,since it defines the maximum amount of time that a messagemay sit in the queue..ppRFC 1123 section 5.3.1.1 says that this value should be at least 30 minutes(although that probably doesn't make sense if you use ``queue-only'' mode)..sh 2 "Daemon Mode".ppIf you allow incoming mail over an IPC connection,you should have a daemon running.This should be set by your.i /etc/rcfile using the.b \-bdflag.The.b \-bdflag and the.b \-qflag may be combined in one call:.(b/usr/\*(SD/sendmail \-bd \-q30m.)b.sh 2 "Forcing the Queue".ppIn some cases you may find that the queue has gotten clogged for some reason.You can force a queue runusing the.b \-qflag (with no value).It is entertaining to use the.b \-vflag (verbose)when this is done to watch what happens:.(b/usr/\*(SD/sendmail \-q \-v.)b.ppYou can also limit the jobs to those with a particular queue identifier,sender, or recipientusing one of the queue modifiers.For example,.q \-qRberkeleyrestricts the queue run to jobs that have the string.q berkeleysomewhere in one of the recipient addresses.Similarly,.q \-qSstringlimits the run to particular senders and.q \-qIstringlimits it to particular identifiers..sh 2 "Debugging".ppThere are a fairly large number of debug flagsbuilt into.i sendmail .Each debug flag has a number and a level,where higher levels means to print out more information.The convention is that levels greater than nine are.q absurd,i.e.,they print out so much information that you wouldn't normallywant to see them except for debugging that particular piece of code.Debug flags are set using the.b \-doption;the syntax is:.(b.ta \w'debug-option 'udebug-flag: \fB\-d\fP debug-listdebug-list: debug-option [ , debug-option ]debug-option: debug-range [ . debug-level ]debug-range: integer | integer \- integerdebug-level: integer.)bwhere spaces are for reading ease only.For example,.(b\-d12 Set flag 12 to level 1\-d12.3 Set flag 12 to level 3\-d3-17 Set flags 3 through 17 to level 1\-d3-17.4 Set flags 3 through 17 to level 4.)bFor a complete list of the available debug flagsyou will have to look at the code(they are too dynamic to keep this documentation up to date)..sh 2 "Trying a Different Configuration File".ppAn alternative configuration filecan be specified using the.b \-Cflag; for example,.(b/usr/\*(SD/sendmail \-Ctest.cf.)buses the configuration file.i test.cfinstead of the default.i /etc/sendmail.cf.If the.b \-Cflag has no valueit defaults to.i sendmail.cfin the current directory..sh 2 "Changing the Values of Options".ppOptions can be overridden using the.b \-oflag.For example,.(b/usr/\*(SD/sendmail \-oT2m.)bsets the.b T(timeout) option to two minutesfor this run only..ppSome options have security implications.Sendmail allows you to set these,but refuses to run as root thereafter..sh 2 "Logging Traffic".ppMany SMTP implementations do not fully implement the protocol.For example, some personal computer based SMTPsdo not understand continuation lines in reply codes.These can be very hard to trace.If you suspect such a problem, you can set traffic logging using the.b \-Xflag.For example,.(b/usr/\*(SD/sendmail \-X /tmp/traffic -bd.)bwill log all traffic in the file.i /tmp/traffic ..ppThis logs a lot of data very quickly and should never be usedduring normal operations.After starting up such a daemon,force the errant implementation to send a message to your host.All message traffic in and out of.i sendmail ,including the incoming SMTP traffic,will be logged in this file..sh 2 "Dumping State".ppYou can ask.i sendmailto log a dump of the open filesand the connection cacheby sending it a.sm SIGUSR1signal.The results are logged at.sm LOG_DEBUGpriority..sh 1 "TUNING".ppThere are a number of configuration parametersyou may want to change,depending on the requirements of your site.Most of these are setusing an option in the configuration file.For example,the line.q OT5dsets option.q Tto the value.q 5d(five days)..ppMost of these options have appropriate defaults for most sites.However,sites having very high mail loads may find they need to tune themas appropriate for their mail load.In particular,sites experiencing a large number of small messages,many of which are delivered to many recipients,may find that they need to adjust the parametersdealing with queue priorities..sh 2 "Timeouts".ppAll time intervals are setusing a scaled syntax.For example,.q 10mrepresents ten minutes, whereas.q 2h30mrepresents two and a half hours.The full set of scales is:.(b.ta 4ns secondsm minutesh hoursd daysw weeks.)b.sh 3 "Queue interval".ppThe argument to the.b \-qflagspecifies how often a sub-daemon will run the queue.This is typically set to between fifteen minutesand one hour.RFC 1123 section 5.3.1.1 recommends that this be at least 30 minutes..sh 3 "Read timeouts".ppIt is possible to time out when reading the standard inputor when reading from a remote SMTP server.These timeouts are set using the.b roption in the configuration file.The argument is a list of.i keyword=valuepairs.The recognized keywords, their default values, and the minimum valuesallowed by RFC 1123 section 5.3.2 are:.nr ii 1i.ip initialThe wait for the initial 220 greeting message[5m, 5m]..ip heloThe wait for a reply from a HELO or EHLO command[5m, unspecified].This may require a host name lookup, sofive minutes is probably a reasonable minimum..ip mail\(dgThe wait for a reply from a MAIL command[10m, 5m]..ip rcpt\(dgThe wait for a reply from a RCPT command[1h, 5m].This should be longbecause it could be pointing at a listthat takes a long time to expand..ip datainit\(dgThe wait for a reply from a DATA command[5m, 2m]..ip datablock\(dgThe wait for reading a data block(that is, the body of the message).[1h, 3m].This should be long because it also applies to programspiping input to.i sendmailwhich have no guarantee of promptness..ip datafinal\(dgThe wait for a reply from the dot terminating a message.[1h, 10m].If this is shorter than the time actually neededfor the receiver to deliver the message,duplicates will be generated.This is discussed in RFC 1047..ip rsetThe wait for a reply from a RSET command[5m, unspecified]..ip quitThe wait for a reply from a QUIT command[2m, unspecified]..ip miscThe wait for a reply from miscellaneous (but short) commandssuch as NOOP (no-operation) and VERB (go into verbose mode).[2m, unspecified]..ip command\(dgIn server SMTP,the time to wait for another command.[1h, 5m]..ip identThe timeout waiting for a reply to an IDENT query[30s, unspecified]..lpFor compatibility with old configuration files,if no ``keyword='' is specified,all the timeouts marked with \(dg are set to the indicated value..ppMany of the RFC 1123 minimum valuesmay well be too short..i Sendmailwas designed to the RFC 822 protocols,which did not specify read timeouts;hence,.i sendmaildoes not guarantee to reply to messages promptly.In particular, a.q RCPT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -