📄 op.me
字号:
on the filesystem on which the queue is mountedthe SMTP server will reject mailwith the452 error code.This invites the SMTP client to try again later..ppBeware of setting this option too high;it can cause rejection of emailwhen that mail would be processed without difficulty..ppThis option can also specify an advertised.q "maximum message size"for hosts that speak ESMTP..sh 2 "Privacy Flags".ppThe.b poption allows you to set certain``privacy''flags.Actually, many of them don't give you any extra privacy,rather just insisting that client SMTP serversuse the HELO commandbefore using certain commands..ppThe option takes a series of flag names;the final privacy is the inclusive or of those flags.For example:.(bOp needmailhelo, noexpn.)binsists that the HELO or EHLO command be used before a MAIL command is acceptedand disables the EXPN command..ppThe.q restrictmailqoption restricts printing the queue to the group that owns the queue directory.It is absurd to set this if you don't also protect the logs..ppThe.q restrictqrunoption restricts people running the queue(that is, using the.b \-qcommand line flag)to root and the owner of the queue directory..sh 2 "Send to Me Too".ppNormally,.i sendmaildeletes the (envelope) sender from any list expansions.For example, if.q mattsends to a list that contains.q mattas one of the members he won't get a copy of the message.If the.b \-m(me too)command line flag, or if the.b moption is set in the configuration file,this behaviour is supressed.Some sites like to run the.sm SMTPdaemon with.b \-m ..sh 1 "THE WHOLE SCOOP ON THE CONFIGURATION FILE".ppThis section describes the configuration filein detail,including hints on how to write one of your ownif you have to..ppThere is one point that should be made clear immediately:the syntax of the configuration fileis designed to be reasonably easy to parse,since this is done every time.i sendmailstarts up,rather than easy for a human to read or write.On the.q "future project"list is aconfiguration-file compiler..ppAn overview of the configuration fileis given first,followed by details of the semantics..sh 2 "Configuration File Lines".ppThe configuration file is organized as a series of lines,each of which begins with a single characterdefining the semantics for the rest of the line.Lines beginning with a space or a tabare continuation lines(although the semantics are not well defined in many places).Blank lines and lines beginning with a sharp symbol(`#')are comments..sh 3 "R and S \*- rewriting rules".ppThe core of address parsingare the rewriting rules.These are an ordered production system..i Sendmailscans through the set of rewriting ruleslooking for a match on the left hand side(LHS)of the rule.When a rule matches,the address is replaced by the right hand side(RHS)of the rule..ppThere are several sets of rewriting rules.Some of the rewriting sets are used internallyand must have specific semantics.Other rewriting setsdo not have specifically assigned semantics,and may be referenced by the mailer definitionsor by other rewriting sets..ppThe syntax of these two commands are:.(b F.b S \c.i n.)bSets the current ruleset being collected to.i n .If you begin a ruleset more than onceit deletes the old definition..(b F.b R \c.i lhs.i rhs.i comments.)bThefields must be separatedby at least one tab character;there may be embedded spacesin the fields.The.i lhsis a pattern that is applied to the input.If it matches,the input is rewritten to the.i rhs .The.i commentsare ignored..ppMacro expansions of the form.b $ \c.i xare performed when the configuration file is read.Expansions of the form.b $& \c.i xare performed at run time using a somewhat less general algorithm.This for is intended only for referencing internally defined macrossuch as.b $hthat are changed at runtime..sh 4 "The left hand side".ppThe left hand side of rewriting rules contains a pattern.Normal words are simply matched directly.Metasyntax is introduced using a dollar sign.The metasymbols are:.(b.ta \w'\fB$=\fP\fIx\fP 'u\fB$*\fP Match zero or more tokens\fB$+\fP Match one or more tokens\fB$\-\fP Match exactly one token\fB$=\fP\fIx\fP Match any phrase in class \fIx\fP\fB$~\fP\fIx\fP Match any word not in class \fIx\fP.)bIf any of these match,they are assigned to the symbol.b $ \c.i nfor replacement on the right hand side,where.i nis the index in the LHS.For example,if the LHS:.(b$\-:$+.)bis applied to the input:.(bUCBARPA:eric.)bthe rule will match, and the values passed to the RHS will be:.(b.ta 4n$1 UCBARPA$2 eric.)b.ppAdditionally, the LHS can include.b $@to match zero tokens.This is.i notbound to a.b $ \c.i Non the RHS, and is normally only used when it stands alonein order to match the null input..sh 4 "The right hand side".ppWhen the left hand side of a rewriting rule matches,the input is deleted and replaced by the right hand side.Tokens are copied directly from the RHSunless they begin with a dollar sign.Metasymbols are:.(b.ta \w'$#mailer\0\0\0'u\fB$\fP\fIn\fP Substitute indefinite token \fIn\fP from LHS\fB$[\fP\fIname\fP\fB$]\fP Canonicalize \fIname\fP\fB$(\fP\fImap key\fP \fB$@\fP\fIarguments\fP \fB$:\fP\fIdefault\fP \fB$)\fP Generalized keyed mapping function\fB$>\fP\fIn\fP \*(lqCall\*(rq ruleset \fIn\fP\fB$#\fP\fImailer\fP Resolve to \fImailer\fP\fB$@\fP\fIhost\fP Specify \fIhost\fP\fB$:\fP\fIuser\fP Specify \fIuser\fP.)b.ppThe.b $ \c.i nsyntax substitutes the corresponding value from a.b $+ ,.b $\- ,.b $* ,.b $= ,or.b $~match on the LHS.It may be used anywhere..ppA host name enclosed between.b $[and.b $]is looked up using the.i gethostent \|(3)routines and replaced by the canonical name\**..(f\**This is actuallycompletely equivalentto $(host \fIhostname\fP$).In particular, a.b $:default can be used..)fFor example,.q $[csam$]might become.q lbl-csam.arpaand.q $[[128.32.130.2]$]would become.q vangogh.CS.Berkeley.EDU..i Sendmailrecognizes it's numeric IP addresswithout calling the name serverand replaces it with it's canonical name..ppThe.b $(\&....b $)syntax is a more general form of lookup;it uses a named map instead of an implicit map.If no lookup is found, the indicated.i defaultis inserted;if no default is specified and no lookup matches,the value is left unchanged..ppThe.b $> \c.i nsyntaxcauses the remainder of the line to be substituted as usualand then passed as the argument to ruleset.i n .The final value of ruleset.i nthen becomesthe substitution for this rule..ppThe.b $#syntax should.i onlybe used in ruleset zeroor a subroutine of ruleset zero.It causes evaluation of the ruleset to terminate immediately,and signals to.i sendmailthat the address has completely resolved.The complete syntax is:.(b\fB$#\fP\fImailer\fP \fB$@\fP\fIhost\fP \fB$:\fP\fIuser\fP.)bThis specifies the{mailer, host, user}3-tuple necessary to direct the mailer.If the mailer is localthe host part may be omitted\**..(f\**You may want to use it for special.q "per user"extensions.For example, at CMU you can send email to.q jgm+foo ;the part after the plus signis not part of the user name,and is passed to the local mailer for local use..)fThe.i mailermust be a single word,but the.i hostand.i usermay be multi-part.If the.i maileris the builtin IPC mailer,the.i hostmay be a colon-separated list of hoststhat are searched in order for the first working address(exactly like MX records).The.i useris later rewritten by the mailer-specific envelope rewriting setand assigned to the.b $umacro.As a special case, if the value to.b $#is.q localand the first character of the.b $:value is.q @ ,the.q @is stripped off, and a flag is set in the address descriptorthat causes sendmail to not do ruleset 5 processing..ppNormally, a rule that matches is retried,that is,the rule loops until it fails.A RHS may also be preceded by a.b $@or a.b $:to change this behavior.A.b $@prefix causes the ruleset to return with the remainder of the RHSas the value.A.b $:prefix causes the rule to terminate immediately,but the ruleset to continue;this can be used to avoid continued application of a rule.The prefix is stripped before continuing..ppThe.b $@and.b $:prefixes may precede a.b $>spec;for example:.(b.ta 8nR$+ $: $>7 $1.)bmatches anything,passes that to ruleset seven,and continues;the.b $:is necessary to avoid an infinite loop..ppSubstitution occurs in the order described,that is,parameters from the LHS are substituted,hostnames are canonicalized,.q subroutinesare called,and finally.b $# ,.b $@ ,and.b $:are processed..sh 4 "Semantics of rewriting rule sets".ppThere are five rewriting setsthat have specific semantics.These are related as depicted by figure 2..(z.hl.ie n \{\.(c +---+ -->| 0 |-->resolved address / +---+ / +---+ +---+ / ---->| 1 |-->| S |-- +---+ / +---+ / +---+ +---+ \e +---+addr-->| 3 |-->| D |-- --->| 4 |-->msg +---+ +---+ \e +---+ +---+ / +---+ --->| 2 |-->| R |-- +---+ +---+.)c.\}.el .ie !"\*(.T"" \\{\.PSboxwid = 0.3iboxht = 0.3imovewid = 0.3imoveht = 0.3ilinewid = 0.3ilineht = 0.3i box invis "addr"; arrowBox3: box "3"A1: arrowBoxD: box "D"; line; L1: HereC: [ C1: arrow; box "1"; arrow; box "S"; line; E1: Here move to C1 down 0.5; right C2: arrow; box "2"; arrow; box "R"; line; E2: Here ] with .w at L1 + (0.5, 0) move to C.e right 0.5L4: arrow; box "4"; arrow; box invis "msg" line from L1 to C.C1 line from L1 to C.C2 line from C.E1 to L4 line from C.E2 to L4 move to BoxD.n up 0.6; rightBox0: arrow; box "0" arrow; box invis "resolved address" width 1.3 line from 1/3 of the way between A1 and BoxD.w to Box0.PE.\}.el .sp 2i.ceFigure 2 \*- Rewriting set semantics.(cD \*- sender domain additionS \*- mailer-specific sender rewritingR \*- mailer-specific recipient rewriting.)c.hl.)z.ppRuleset threeshould turn the address into.q "canonical form."This form should have the basic syntax:.(blocal-part@host-domain-spec.)bIf no.q @sign is specified,then thehost-domain-spec.i maybe appended from thesender address(if the.b Cflag is set in the mailer definitioncorresponding to the.i sendingmailer).Ruleset threeis applied by.i sendmailbefore doing anything with any address..ppRuleset zerois applied after ruleset threeto addresses that are going to actually specify recipients.It must resolve to a.i "{mailer, host, user}"triple.The.i mailermust be defined in the mailer definitionsfrom the configuration file.The.i hostis defined into the.b $hmacrofor use in the argv expansion of the specified mailer..ppRulesets one and twoare applied to all sender and recipient addresses respectively.They are applied before any specificationin the mailer definition.They must never resolve..ppRuleset four is applied to all addressesin the message.It is typically usedto translate internal to external form..sh 4 "IPC maile
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -