]> diplodocus.org Git - nmh/blobdiff - man/slocal.man
Added context_find_prefix().
[nmh] / man / slocal.man
index eeb0765544c7adcc274fea459782ad96220c879f..6c8e4909bbc8c4e63d10a8fecfb07e09f1eefbee 100644 (file)
@@ -1,15 +1,13 @@
+.TH SLOCAL %manext1% "May 2, 2016" "%nmhversion%"
 .\"
 .\" %nmhwarning%
-.\" $Id$
 .\"
-.TH SLOCAL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
 .SH NAME
 slocal \- asynchronously filter and deliver new mail
 .SH SYNOPSIS
 .HP 5
 .na
-.B %libdir%/slocal
-[address\ info\ sender]
+.B %nmhlibexecdir%/slocal
 .RB [ \-addr
 .IR address ]
 .RB [ \-info
@@ -60,7 +58,7 @@ Under
 .BR sendmail ,
 the sender will obtained from the UUCP
 \*(lqFrom:\*(rq line, if present.  The user may override these
-values with command line arguments, or arguments to the
+values with the
 .B \-addr
 and
 .B \-sender
@@ -78,7 +76,7 @@ The
 switch tells
 .B slocal
 the name of the user for
-whom it is delivering mail.  The
+whom it is delivering mail.  It must exist on the local system.  The
 .B \-mailbox
 switch tells
 .B slocal
@@ -118,7 +116,6 @@ allow you to see the decisions and actions that
 is taking, as well as check for syntax errors in your
 .RI \*(lq \&.maildelivery \*(rq
 file.
-
 .SS "Message Transfer Agents"
 Most modern MTAs including
 .BR sendmail ,
@@ -128,15 +125,13 @@ and
 support a \&.forward file for directing incoming mail.
 You should include the line
 .PP
-.RS 5
-\*(lq|\ %libdir%/slocal\ \-user\ username\*(rq
-.RE
+.ce
+\*(lq|\ %nmhlibexecdir%/slocal\ \-user\ username\*(rq
 .PP
 in your \&.forward file in your home directory.  This will cause
 your MTA to invoke
 .B slocal
 on your behalf when a message arrives.
-
 .SS "The Maildelivery File"
 The
 .RI \*(lq \&.maildelivery \*(rq
@@ -144,7 +139,7 @@ file controls how
 .B slocal
 filters and delivers
 incoming mail.  Each line of this file consists of five fields, separated
-by white-space or comma.  Since double-quotes are honored, these
+by whitespace or comma.  Since double-quotes are honored, these
 characters may be included in a single argument by enclosing the entire
 argument in double-quotes.  A double-quote can be included by preceding it
 with a backslash.  Lines beginning with `#' and blank lines are ignored.
@@ -154,7 +149,7 @@ The format of each line in the
 file is:
 .PP
 .RS 5
-.B header      pattern action  result  string
+.B "header     pattern action  result  string"
 .RE
 .PP
 .BR header :
@@ -191,9 +186,10 @@ Matching is case-insensitive, but does not use regular expressions.
 The action to take to deliver the message.  When a message is delivered,
 a \*(lqDelivery\-Date:\ date\*(rq header is added which indicates the date
 and time that message was delivered.
-.TP \w'qpipezorztzzz'u
+.TP 4
 .I destroy
 This action always succeeds.
+.TP 4
 .IR file ", " mbox ", or " >
 Append the message to the file named by
 .IR string .
@@ -201,12 +197,12 @@ The message is
 appended to the file in mbox (uucp) format.  This is the format used by most
 other mail clients (such as mailx, elm).  If the message can be appended to
 the file, then this action succeeds.
-.TP \w'qpipezorztzzz'u
+.TP 4
 .I mmdf
 Identical to
 .IR file ,
 but always appends the message using the MMDF mailbox format.
-.TP \w'qpipezorztzzz'u
+.TP 4
 .IR pipe " or " |
 Pipe the message as the standard input to the command named by
 .IR string ,
@@ -215,7 +211,7 @@ using the Bourne shell
 to interpret the string.
 Prior to giving the string to the shell, it is expanded with the following
 built-in variables:
-.RS \w'qpipezorztzzz'u
+.RS
 .TP \w'zzreplyztozaaa'u
 $(sender)
 the out-of-band sender information
@@ -232,8 +228,7 @@ either the \*(lqReply\-To:\*(rq or \*(lqFrom:\*(rq field of the message
 $(info)
 the out-of-band information specified
 .RE
-.PP
-.TP \w'qpipezorztzzz'u
+.TP 4
 .IR qpipe " or " ^
 Similar to
 .IR pipe ,
@@ -241,7 +236,7 @@ but executes the command
 directly, after built-in variable expansion, without assistance from
 the shell.  This action can be used to avoid quoting special characters
 which your shell might interpret.
-.TP \w'qpipezorztzzz'u
+.TP 4
 .IR folder " or " +
 Store the message in the
 .B nmh
@@ -278,7 +273,6 @@ message is considered delivered.
 The delivery file is always read completely, so that several matches
 can be made and several actions can be taken.
 .RE
-
 .SS "Security of Delivery Files"
 In order to prevent security problems, the
 .RI \*(lq \&.maildelivery \*(rq
@@ -292,14 +286,13 @@ file cannot be found, or does not
 perform an action which delivers the message, then
 .B slocal
 will check for a global delivery file at
-.IR %etcdir%/maildelivery .
+.IR %nmhetcdir%/maildelivery .
 This file is read according to the same rules.  This file must be
-owned by the root and must be writable only by the root.
+owned by root and must be writable only by root.
 .PP
 If a global delivery file cannot be found or does not perform an
 action which delivers the message, then standard delivery to the
 user's maildrop is performed.
-
 .SS "Example Delivery File"
 To summarize, here's an example delivery file:
 .PP
@@ -334,9 +327,8 @@ From      steve     destroy A       \-
 default   \-        file    ?       mailbox
 
 # always run rcvtty
-*         \-        pipe    R       %libdir%/rcvtty
+*         \-        pipe    R       %nmhlibexecdir%/rcvtty
 .fi
-
 .SS "Sub-process environment"
 When a process is invoked, its environment is: the user/group-ids are
 set to recipient's ids; the working directory is the recipient's home
@@ -362,27 +354,28 @@ failed.
 .PP
 In order to avoid any time limitations, you might implement a process
 that began by
-.BR fork ()-ing.
+.IR fork ()-ing.
 The parent would return the appropriate
 value immediately, and the child could continue on, doing whatever it
 wanted for as long as it wanted.  This approach is somewhat risky if
 the parent is going to return an exit status of zero.  If the parent is
 going to return a non-zero exit status, then this approach can lead to
 quicker delivery into your maildrop.
-
 .SH FILES
 .fc ^ ~
 .nf
-.ta \w'%etcdir%/ExtraBigFileName  'u
-^%etcdir%/mts.conf~^nmh mts configuration file
+.ta \w'%nmhetcdir%/ExtraBigFileName  'u
+^%nmhetcdir%/mts.conf~^nmh mts configuration file
 ^$HOME/\&.maildelivery~^The file controlling local delivery
-^%etcdir%/maildelivery~^Rather than the standard file
+^%nmhetcdir%/maildelivery~^Rather than the standard file
 ^%mailspool%/$USER~^The default maildrop
 .fi
-
 .SH "SEE ALSO"
-rcvdist(1), rcvpack(1), rcvstore(1), rcvtty(1), mh\-format(5)
-
+.IR rcvdist (1),
+.IR rcvpack (1),
+.IR rcvstore (1),
+.IR rcvtty (1),
+.IR mh\-format (5)
 .SH DEFAULTS
 .nf
 .RB ` \-noverbose '
@@ -390,12 +383,16 @@ rcvdist(1), rcvpack(1), rcvstore(1), rcvtty(1), mh\-format(5)
 .RB ` \-maildelivery "' defaults to $HOME/\&.maildelivery"
 .RB ` \-mailbox "' deaults to %mailspool%/$USER"
 .RB ` \-file "' defaults to stdin"
+.RB ` \-addr "' defaults to the current user"
 .RB ` \-user "' defaults to the current user"
 .fi
-
+.PP
+.B \-addr
+and
+.B \-user
+will be set the the user part of the Local-Mailbox profile entry, if set.
 .SH CONTEXT
 None
-
 .SH HISTORY
 .B Slocal
 was originally designed to be backward-compatible with
@@ -424,7 +421,6 @@ value
 .B RP_MECH
 (200), which means
 \*(lquse an alternate route\*(rq (deliver the message to the maildrop).
-
 .SH BUGS
 Only two return codes are meaningful, others should be.
 .PP