home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume7
/
sendmail.ms
< prev
next >
Wrap
Text File
|
1989-08-05
|
16KB
|
668 lines
Newsgroups: comp.sources.misc
subject: v07i115: Sendmail reference card (troff -ms)
From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
Reply-To: jim@hoptoad.UUCP (Jim Joyce)
Posting-number: Volume 7, Issue 115
Submitted-by: jim@hoptoad.UUCP (Jim Joyce)
Archive-name: sendmail.ms
[Jetroff 2.x should be able to handle this unchanged; I'll find out soon,
as I can use this myself. Other troff postprocessors I don't know. ++bsa]
This is troff-able source for the Sendmail Reference Card
Please do not use this code after September 15, as I will by then
post a new source with gathered suggestions, corrections, etc.
My thanks to Eric Allman, Erik Fair and Eliot Lear for their comments.
Any errors/undocumented Sun-specific things are mine alone.
This file is in two parts:
* the shell script I used to print the card
* the source for tbl | eroff
The finished card takes up a legal sized page.
My LaserJetII only prints 8 1/2 x 11, so I printed two pages at a time
in landscape mode, 7i page length (-l2:7i);
with page number ordering 6, 7, 8, 1, 2, 3, 4, 5 (make a printer's dummy);
and the -ms macros. I taped the pages together to make the legal sized card.
The order looks weird, but when folded a` la Z-fold it works fine.
I realize everyone does not have Elan's eroff, or an equivalent package,
and so you may need to print out pages, cut and tape, then copy.
If you can't get it to work well enough for you, contact me with
a US mail address and I will send you one paper copy you can reproduce.
Please do not ask me to send multiple copies.
----end of intro----end of intro----
#! /bin/sh
# This file was wrapped with "dummyshar". "sh" this file to extract.
# Contents: print.card sendmail.ms
echo extracting 'print.card'
if test -f 'print.card' -a -z "$1"; then echo Not overwriting 'print.card'; else
sed 's/^X//' << \EOF > 'print.card'
X: # The shell script:
X: # print.card -- print the sendmail ref card
Xtrap 'trap 0; exit 0' 3
Xcat contents | tbl | eroff -l2:7i -Oo6,7,8,1,2,3,4,5 -ms $1
EOF
chars=`wc -c < 'print.card'`
if test $chars != 152; then echo 'print.card' is $chars characters, should be 152 characters!; fi
fi
echo extracting 'sendmail.ms'
if test -f 'sendmail.ms' -a -z "$1"; then echo Not overwriting 'sendmail.ms'; else
sed 's/^X//' << \EOF > 'sendmail.ms'
X.\"The source for tbl | eroff:
X.\"Put the lines below into a file corresponding to ``contents'' in the script
X.fp 1 H
X.fp 2 HI
X.fp 3 HB
X.bd HI 3
X.po 0i
X.nr PO 0i
X.pl 8.4i \" Duplex -- with elan fudge
X.ll 3.2i
X.lt 3.2i
X.nr LL 3.2i
X.nr HM .5i
X.nr FM .25i
X.\".ds CH -\fHPanel %-
X.ds CH
X.ft H
X.de Cb
X. ps 12
X. ft CB
X..
X.de Ce
X. ps 0
X. ft H
X..
X.de Nh
X. ne 3
X. ft HB
X. NH
X. ft HB
X..
X.LP
X.ce
X.ft HB
X\s14Sendmail Reference Card\s0
X.sp .3i
X.ft HI
X.ce
XJim Joyce
X.sp .2i
X.ce 99
X.ft H
X.nf
XThe Gawain Group
X139 Noe St
XSF, CA 94114
X+1-415/626-7581
X.NH 1
XNotation for this card
X.LP
X.TS
Xl 2 l.
X\s12\f(CBstuff\fH\s10 As it should be typed; examples
X\f(HIItalics\fH Items you supply
XNormal Explanation
X.TE
X.Nh
XCommand Line Arguments
X.LP
X.TS
Xlp12fCB 2 lp10w(2.5i).
X-f \s10\f(HIname\fH Sender's name;
X ignored unless trusted user
X-r \s10\f(HIname\fH Obsolete form of \s12\f(CB-f\fH\s0
X-h 9 Set hop count to \s12\f(CB9\fH\s0
X-F \s10\f(HIname\fH Set full name of sender to \f(HIname\fH
X-n Do not allow aliasing or forwarding
X-t Send to everyone in \s12\f(CBTo:,
X \s12CC:, Bcc\fH\s10 lines;
X delete \s12\f(CBBcc:\fH\s10 line before sending
X-b\s10\f(HIx\fH Set operation mode to \f(HIx\fH, as in:
X-bm Deliver the mail (default)
X-ba Run in ARPANET mode
X-bs Speak SMTP
X-bd Run as a daemon
X-bt Run in test mode
X-bv Verify recipients
X-bi Initialize the alias database
X-bp Print the mail queue
X-bz Freeze the configuration file
X-q\s10\f(HI1h\fH Process queued mail every hour;
X if no time specified, run once
X-C\s10\f(HIfile\fH Alternative configuration file
X.bp
X-d \s10\f(HIn\fH Set debug level to \f(HIn\fH
X-o \s10\f(HIxvalue\fH Set configuration option \f(HIx\fH to \f(HIvalue\fH
X-M \s10\f(HImsg\fH\(dg Runs given message ID
X-R \s10\f(HIname\fH\(dg Run only messages for \f(HIname\fH
X.TE
X.Nh
XConfiguration File Definitions
X.LP
X.ft H
X.TS
Xlp12fCB 2 l.
XD Define a macro
X \s12\f(CBDW SUN.COM\fH\s0
X \s12\f(CB$W\fH\s0 has the value \s12\f(CBSUN.COM\fH\s0
XC Classes of tokens to match; no dots in tokens
X \s12\f(CBCT arpa com edu\fH\s0
X \s12\f(CBCT us de fr jp\fH\s0
XF Get definition tokens from named file
X \s12\f(CBFT filename\fH\s0
X If \s12\f(CBfilename\fH\s0 contains
X \s12\f(CBarpa com edu ...\fH\s0
X \s12\f(CB$T\fH\s0 contains \s12\f(CBarpa com edu ...\fH\s0
XO Options to sendmail
X [Zillions; see section \f(HBOptions to Sendmail\fH]
X \s12\f(CBOQ /var/spool/mqueue\fH\s0
X Directory to use as queue directory
XH Header format text to be provided
X \s12\f(CBH?F?FROM: $q\fH\s0
X Insert \s12\f(CBFROM: username\fH\s0 for from line
X Characters between \s12\f(CB?\fH\s0 are mailer flags;
X see \f(HBM \(em Define mailer\fH.
XT Trusted users \(em use with caution!
X \s12\f(CBT daemon root\fH\s0
XP \s12\f(CBP\fH\s0recedence/priorities for messages
X \s12\f(CBPfirst-class=0\fH\s0
X \s12\f(CBPspecial-delivery=100\fH\s0
X \s12\f(CBPjunk=-100\fH\s0
X.TE
X.Nh
XOptions to Sendmail
X.LP
X.TS
Xlp12fCB 2 lp10fH .
XA\s10\f(HIfile\fH Use \f(HIfile\fH as alias file.
X.br
X Default: \f(HIaliases\fH in current directory
Xa\s10\f(HItime\fH Time to wait for \s12\f(CB@:@\fH\s10 entry
X before rebuilding the alias database
X.bp
XB\s10\f(HIvalue\fH Blank substitute; default `` \s14.\s0 ''
Xb\s10\f(HIn\fH Disallow empty messages
X to more than n recipients
XC\s10\f(HIn\fH Remove \f(HIn\fH delivered recipients from queue
Xc If outgoing mailer marked as expensive,
X do not connect immediately.
XD Rebuild alias database if necessary.
Xd\s10\f(HIx\fH Deliver in mode \f(HIx\fH:
X \s10\f(HIi\fH \(em interactively/synchronously
X \s10\f(HIb\fH \(em background/asynchronously
X \s10\f(HIq\fH \(em queue to deliver during queue run
Xe\s10\f(HIx\fH Resolve errors via \f(HIx\fH:
X \s10\f(HIp\fH \(em print error message (default)
X \s10\f(HIq\fH \(em No messages, just give exit status
X \s10\f(HIm\fH \(em mail errors back to sender
X \s10\f(HIw\fH \(em write errors (mail if user not on)
X \s10\f(HIe\fH \(em mail errors but give zero exit status
XF\s10\f(HIn\fH Temporary queue file mode, in octal
Xf Save UNIX-style \f(HBFrom\fH lines at
X front of headers
Xg\s10\f(HIn\fH Default group id for mailers is \f(HIn\fH
XH\s10\f(HIfile\fH Help file for SMTP
Xh\s10\f(HIn\fH Maximum hop count is \f(HIn\fH; default 17
Xi Ignore initial dot even if string length is 1
XL\s10\f(HIn\fH Default log level is \f(HIn\fH
XM\s10\f(HIxvalue\fH Set macro \f(HIx\fH to \f(HIvalue\fH
X (Only for command line use)
Xm T{
X.na
XSend to me even if I am in an alias expansion
XT}
Xo T{
X.na
XHeaders may be in old format;
X.br
Xbe adaptive
XT}
XP\s10\f(HIname\fH T{
X.na
XName of local Postmaster.
XIf defined, error messages are sent to this name.
XT}
XQ\s10\f(HIdir\fH T{
X.na
XUse \s10\f(HIdir\fH as queue directory
XT}
Xq\s10\f(HIlimit\fH Size limit of messages to be queued
X under heavy load. Default is 10,000 bytes.
XR\s10\f(HIserver\fH Deliver through Remote SMTP server
Xr\s10\f(HItime\fH Interval for read timeout
XS\s10\f(HIfile\fH Statistics file
Xs Instantiate the queue file even if
X attempting immediate delivery.
X.bp
XT\s10\f(HItime\fH Set mail queue timeout to \f(HItime\fH
Xu\s10\f(HIn\fH T{
X.na
XSet default userid to \s10\f(HIn\fH.
XSUID mailers will run suid
Xno matter what is set here.
XT}
Xv Verbose mode.
XX\s10\f(HIn\fH Set load average value; default 0
Xx\s10\f(HIn\fH T{
X.na
XSet load average value for only queueing mail
XT}
XY\s10\f(HIname\fH T{
X.na
XYellow pages map name;
Xdefault, \f(HImail.aliases\fH
XT}
Xy\s10\f(HIn\fH T{
X.na
XPenalize messages with \s10\f(HIn\fH bytes-per-recipient
XT}
XZ\s10\f(HIn\fH T{
X.na
XPenalize messages
Xwith this many bytes-per-delivery attempts
XT}
Xz\s10\f(HIn\fH T{
X.na
XPenalize messages
Xwith this many bytes-per-class
XT}
X.TE
X.Nh
XM \(em Define mailer
X.LP
XOnly first character of field name is checked
X.TS
Xlp12fCB 2 lp10fH .
XP\s10\f(HIath\fH Mailer pathname
X \s12\f(CBP=/bin/mail,\fH\s10
XF\s10\f(HIlags\fH Mailer Flags
X \s12\f(CBF=rlsDFMmnP,\fH\s10
X See \f(HBMailer Flags\fH, below
XS\s10\f(HIender\fH Rewriting ruleset number
X \s12\f(CBS=10,\fH\s10
XR\s10\f(HIecipient\fH Rewriting ruleset number
X \s12\f(CBR=20,\fH\s10
XA\s10\f(HIrgv\fH Argument vector to pass to mailer
X \s12\f(CBA=mail -d $u\fH\s10
XE\s10\f(HIol\fH End of line string for mailer
XM\s10\f(HIaxsize\fH Maximum mailer message length
XL\s10\f(HIength\fH Argv's maximum length
X.TE
X.br
XExample:
X.nf
X.Cb
XMlocal, P=/bin/mail,F=rlsDFMmnP,
X S=10,R=20,A=mail -d $u
XMprog, P=/bin/sh,F=lsDFMeuP,
X S=10,R=20,A=sh -c $u
X.Ce
X.fi
X.bp
X.Nh
XMailer Flags
X.LP
XEach mailer has its own set of mailer flags.
X.TS
Xlp12fCB 2 lp10fH .
XC T{
X.na
XNames in the header
Xare to have sender's domain added
Xif they do not have an @
Xafter being rewritten by ruleset 3
XT}
XD Mailer wants a \f(HBDate:\fH header line
XE Escape \f(HBFrom:\fH with \f(HB>From:\fH
Xe Expensive mailer; queue mail
XF Mailer wants a \f(HBFrom:\fH line
Xf Mailer wants a \f(HB-f \f(HIfrom\fH flag
X (Only if a network forward operation)
Xh Preserve uppercase in host names
XL Limit line lengths as per RFC821
Xl Mailer is local; final delivery performed
XM Mailer wants a \f(HBMessage-Id:\fH line
Xm Can send to multiple users on same host
X in one transaction.
Xn Do not insert UNIX-style \f(HBFrom\fH line
XP Mailer wants a \f(HBReturn-Path:\fH line
Xp Add local host to SMTP's \f(HBMAIL From:\fH line
Xr Same as \f(HBf\fH, but sends a -r flag
XS Do not reset userid before calling mailer
X (Avoids forged names)
Xs Strip quotes off name before calling mailer
XU Mailer wants UNIX-style \f(HBFrom\fH lines
Xu Preserve uppercase in user names
XX T{
X.na
XLines beginning with dot will have a dot added
XT}
Xx Mailer wants a \f(HBFull-Name:\fH line
X.TE
X.KS
X.Nh
XRuleset Numbers
X.LP
X.ft H
X.TS
Xl 2 l.
X3 Puts < > around hostname;
X internal form. Always done first
X4 Removes < > from hostname;
X external form. Always done last
X0 Returns (protocol,host,user) triple
X1 Handles \s12\f(CBFrom\fH\s0 in header, if anything
X2 Handles \s12\f(CBTo\fH\s0 in header, if anything
X.TE
X.KE
X.KS
X.Nh
XRuleset Sequences
X.LP
X.ft H
X.TS
Xl 2 l.
X\f(HBEnvelope\fH
XRecipient T{
X.na
X3 - 0 - 4 (4 applied to user name from ruleset 0)
XT}
XSender 3 - 1 - 4
X\f(HBHeader\fH
XRecipient 3 - 2 - \f(HIxx\fH - 4
X \f(HIxx\fH is ruleset number in R=\f(HIxx\fH
XSender 3 - 1 - \f(HIxx\fH - 4
X \f(HIxx\fH is ruleset number in S=\f(HIxx\fH
X.TE
X.KE
X.Nh
X\f(HBConditionals and Macros\fH
X.LP
X.vs -1
X.na
XMacros referenced using \s12\f(CB$\s10\f(HIx\fH
X.br
X\(em \s10\f(HIx\fH is a one-letter variable name
X.LP
XConditionals:
X\s12\f(CB$?\s10\f(HIx text\s12\f(CB $| \s10\f(HIother\s12\f(CB $.\fH\s10
X.TS
Xl 2 l.
X\s12\f(CB$?\s10\f(HIx\fH if macro \f(HIx\fH is set/supplied
X\f(HItext\fH insert \f(HItext\fH
X\s12\f(CB$|\fH\s10 else (the else clause is not required)
X\s10\f(HIother\fH insert \f(HIother\fH
X\s12\f(CB$.\fH\s10 end of conditional
X.TE
X.Nh
XSendmail Macros to Define in .cf
X.LP
X.ft H
XLower-case letters reserved for special meanings
X.br
XMust be defined for sendmail:
X.LP
X.TS
Xlp12fCB 2 lp10fH .
Xe SMTP entry message; printed on SMTP startup
X (Must begin with $j)
X \s12\f(CBDe$j Sendmail $v ready at $b\fH\s10
Xj T{
X.na
XOfficial domain name for this site;
X.br
X\s12\f(CBDj$H
X.br
XDj$H.$D
XT}
Xl T{
X.na
XFormat of the UNIX ``From'' line
X.br
X\s12\f(CBDlFrom $g $d
XT}
Xn T{
X.na
XName of the daemon for error messages
X.br
X\s12\f(CBDnMAILER-DAEMON
XT}
Xo T{
X.na
XSet of ``separators'' in tokens
X.br
X\s12\f(CBDo.:%@!^=/
X.br
X.ft H
X.ps 10
X\(em Beware! Can be dangerous!
XT}
X.vs +1
X.bp
Xq T{
X.na
XDefault sender name format;
X.br
X\f(HIMUST\fH be RFC 822 compliant!
X.br
X\s12\f(CBDq$g$?x ($x)$.\fH\s10
X.br
XInsert \f(HIFull Name\fH in parens if defined
XT}
X.\".br
X.\"See \f(HBConditionals and Macros\fH, above
X.TE
X.Nh
XMacros Supplied by Sendmail
X.LP
X.ft H
X.br
X\s10\f(HIReferenced\fH using \f(HI$x\fH
X.br
X\s10\f(HIMatched\fH if in the Left Hand Side (LHS)
X.br
X\s10\f(HIInserted\fH if in the Right Hand Side (RHS)
X.br
XLower-case letters reserved for special meanings
X.TS
Xlp12fCB 2 lfH .
Xa Origination date, in ARPANET format
Xb T{
X.na
XCurrent date, in ARPANET format
XT}
Xc T{
X.na
XHop count
XT}
Xd T{
X.na
XDate in UNIX (ctime) format
XT}
Xf T{
X.na
XSender (from) name
XT}
Xg T{
X.na
XSender name relative to recipient
XT}
Xh T{
X.na
XRecipient host
XT}
Xi T{
X.na
XQueue ID
XT}
Xm T{
X.na
XDomain name
XT}
Xp T{
X.na
XSendmail's process ID
XT}
Xr T{
X.na
XProtocol used
XT}
Xs T{
X.na
XSender's host name
XT}
Xt T{
X.na
XNumeric representation of current time
XT}
Xu T{
X.na
XRecipient user
XT}
Xv T{
X.na
XVersion number of sendmail
XT}
Xw T{
X.na
XHostname of this site
XT}
Xx T{
X.na
XFull name of the sender
XT}
Xz T{
X.na
XHome directory of the recipient
XT}
X.TE
X.sp
X.TS
Xbox;
Xc
Xlw(3i).
X\f(HBNOTE\fH
XT{
X.na
XItems marked with \(dg,
XYellow Pages references and
Xany ``%''-related items apply
Xspecifically to SUN OS-derived systems.
XT}
XT{
X.na
XPortions exerpted from
X.HI
XSendmail Installation and Operations Guide,
X.H
Xby Eric P. Allman.
XT}
X.TE
X.KS
X.Nh
XThe Left Hand Side (LHS)
X.br
XMetasymbols for Substitutions
X.LP
X.ft H
X.TS
Xlp12fCB 2 lp10w(2.8i).
X$* Match zero or more tokens
X$+ Match one or more tokens
X$- Match exactly one token
X$=\s10\f(HIx\fH Match any string in class \f(HIx\fH
X$~\s10\f(HIx\fH Any token NOT in class \f(HIx\fH
X$%\s10\f(HIx\fH Any token in yp map $\f(HIx\fH
X$%y Any hostname in \f(HIhosts.byname\fH
X or \f(HI/etc/hosts\fH if not running YP
X$!\s10\f(HIx\fP Any token NOT in yp map $\f(HIx\fH
X$\s10\f(HIx\fP Match macro \f(HIx\fH
X.TE
X.KE
X.Nh
X.na
XThe Right Hand Side (RHS)
X.br
XMetasymbols for Substitutions
X.LP
X.ft H
X.\"Match 0 or more tokens; pick off first one and run ruleset 0 on it
X.TS
Xlp12fCB 2 lp10fH .
X$\s10\f(HIx\fH T{
X.na
XExpand macro \f(HIx\fH
XT}
X$\s10\f(HIn\fH T{
X.na
XSubstitute token \f(HIn\fH from LHS;
X.br
XEx: $1 is first thing matched
XT}
X$>\s10\f(HIn\fH Remainder of line is processed
X & passed to ruleset \f(HIn\fH
X$@ T{
X.na
XReturn result of this action;
Xonly at the beginning of the line
XT}
X$@\s10\f(HIhost\fH T{
X.na
XSpecify \s10\f(HIhost\fH*
X.br
X(+prefix? ruleset return)
XT}
X$#\s10\f(HImailer\fH T{
X.na
XResolve to \s10\f(HImailer\fH*
X.br
X(Only to be used in ruleset 0)
XT}
X$: T{
X.na
XApply this action exactly once
X.br
X\(em DON'T iterate
X.br
XOnly at beginning of the line
XT}
X$:\s10\f(HIuser\fH T{
X.na
XSpecify \s10\f(HIuser\fH*
X.br
X(+prefix rule limit)
XT}
X$[\s10\f(HIhost\fP\s12$] T{
X.na
XMap to primary hostname
XT}
X${\s10\f(HIx name\s12\f(CB$} T{
X.na
XMap \s10\f(HIname\fP through yp map $\f(HIx\fH
XT}
X.TE
X* Realistically, a 3-tuple:
X.br
X\s12\f(CB$#\s10\f(HImailer\s12\fP$@\s10\f(HIhost\s12\fP$:\f(HI\s10user\s12\fP\fH\s0
X.LP
X.sp
X.ps 8
X.vs 10
X.nr PS 8
X.nr VS 10
X.ft H
X\(co 1989 by Jim Joyce, all rights reserved
X.br
XPermission is hereby granted to reproduce this material
Xso long as this copyright notice is printed legibly and intact.
XThe Gawain Group, 139 Noe St, SF 94114
X+1-415/626-7581
EOF
chars=`wc -c < 'sendmail.ms'`
if test $chars != 12483; then echo 'sendmail.ms' is $chars characters, should be 12483 characters!; fi
fi
exit 0