]> diplodocus.org Git - nmh/blobdiff - man/slocal.man
new.c: Order two return statements to match comment.
[nmh] / man / slocal.man
index f32b48942db7b5e1c8ebba355da7581f9494cd53..520ef531b2d2e40a25f565c060f99eab2aa72404 100644 (file)
@@ -1,15 +1,15 @@
-.\"
+.TH SLOCAL %manext1% 2016-05-02 "%nmhversion%"
+.
 .\" %nmhwarning%
 .\" %nmhwarning%
-.\" $Id$
-.\"
-.TH SLOCAL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
+.
 .SH NAME
 .SH NAME
-slocal \- asynchronously filter and deliver new mail
+slocal \- asynchronously filter and deliver new mail to nmh
 .SH SYNOPSIS
 .HP 5
 .na
 .SH SYNOPSIS
 .HP 5
 .na
-.B %libdir%/slocal
-[address\ info\ sender]
+.B %nmhlibexecdir%/slocal
+.RB [ \-help ]
+.RB [ \-version ]
 .RB [ \-addr
 .IR address ]
 .RB [ \-info
 .RB [ \-addr
 .IR address ]
 .RB [ \-info
@@ -28,11 +28,9 @@ slocal \- asynchronously filter and deliver new mail
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-suppressdup " | " \-nosuppressdup ]
 .RB [ \-debug ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-suppressdup " | " \-nosuppressdup ]
 .RB [ \-debug ]
-.RB [ \-version ]
-.RB [ \-help ]
 .ad
 .SH DESCRIPTION
 .ad
 .SH DESCRIPTION
-.B Slocal
+.B slocal
 is a program designed to allow you to have your inbound
 mail processed according to a complex set of selection criteria.
 You do not normally invoke
 is a program designed to allow you to have your inbound
 mail processed according to a complex set of selection criteria.
 You do not normally invoke
@@ -45,9 +43,9 @@ is invoked on your behalf by your system's Message Transfer Agent
 when the message arrives.
 .PP
 The message selection criteria used by
 when the message arrives.
 .PP
 The message selection criteria used by
-.B slocal is specified
-in the file
-.RI \*(lq \&.maildelivery \*(rq
+.B slocal
+is specified in the file
+.RI \*(lq .maildelivery \*(rq
 in the user's home directory.
 You can specify an alternate file with the
 .B \-maildelivery
 in the user's home directory.
 You can specify an alternate file with the
 .B \-maildelivery
@@ -60,7 +58,7 @@ Under
 .BR sendmail ,
 the sender will obtained from the UUCP
 \*(lqFrom:\*(rq line, if present.  The user may override these
 .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
 .B \-addr
 and
 .B \-sender
@@ -70,7 +68,7 @@ The message is normally read from the standard input.  The
 .B \-file
 switch sets the name of the file from which the message should be
 read, instead of reading stdin.  This is useful when debugging a
 .B \-file
 switch sets the name of the file from which the message should be
 read, instead of reading stdin.  This is useful when debugging a
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file.
 .PP
 The
 file.
 .PP
 The
@@ -78,11 +76,11 @@ The
 switch tells
 .B slocal
 the name of the user for
 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
 .B \-mailbox
 switch tells
 .B slocal
-the name of the user's maildrop file.
+the name of the user's mail drop file.
 .PP
 .B slocal
 is able to detect and suppress duplicate messages.
 .PP
 .B slocal
 is able to detect and suppress duplicate messages.
@@ -111,50 +109,47 @@ stdout about its progress.  The
 switch produces more
 verbose debugging output on stderr.  These flags are useful when
 creating and debugging your
 switch produces more
 verbose debugging output on stderr.  These flags are useful when
 creating and debugging your
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file, as they
 allow you to see the decisions and actions that
 .B slocal
 is taking, as well as check for syntax errors in your
 file, as they
 allow you to see the decisions and actions that
 .B slocal
 is taking, as well as check for syntax errors in your
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file.
 file.
-
 .SS "Message Transfer Agents"
 Most modern MTAs including
 .BR sendmail ,
 .SS "Message Transfer Agents"
 Most modern MTAs including
 .BR sendmail ,
-.BR postfix
+.BR postfix ,
 and
 and
-.BR exim
+.B exim
 support a \&.forward file for directing incoming mail.
 You should include the line
 .PP
 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.
 .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
 .SS "The Maildelivery File"
 The
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file controls how
 .B slocal
 filters and delivers
 incoming mail.  Each line of this file consists of five fields, separated
 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.
 .PP
 The format of each line in the
 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.
 .PP
 The format of each line in the
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file is:
 .PP
 .RS 5
 file is:
 .PP
 .RS 5
-.B header      pattern action  result  string
+.B "header     pattern action  result  string"
 .RE
 .PP
 .BR header :
 .RE
 .PP
 .BR header :
@@ -173,7 +168,7 @@ the address that was used to cause delivery to the recipient
 .TP \w'defaultrrr'u
 .I default
 this matches
 .TP \w'defaultrrr'u
 .I default
 this matches
-.B only
+.I only
 if the message hasn't been delivered yet
 .TP \w'defaultrrr'u
 .I *
 if the message hasn't been delivered yet
 .TP \w'defaultrrr'u
 .I *
@@ -263,7 +258,7 @@ Perform the action.  If the action succeeds, then the message
 is considered delivered.
 .TP \w'Azzz'u
 .I R
 is considered delivered.
 .TP \w'Azzz'u
 .I R
-Perform the action. Regardless of the outcome of the action,
+Perform the action.  Regardless of the outcome of the action,
 the message is not considered delivered.
 .TP \w'Azzz'u
 .I ?
 the message is not considered delivered.
 .TP \w'Azzz'u
 .I ?
@@ -278,28 +273,26 @@ 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
 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
 .SS "Security of Delivery Files"
 In order to prevent security problems, the
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file must be owned either by the user or by root, and must be
 writable only by the owner.  If this is not the case, the file is
 not read.
 .PP
 If the
 file must be owned either by the user or by root, and must be
 writable only by the owner.  If this is not the case, the file is
 not read.
 .PP
 If the
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 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
 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
 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
 .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.
-
+user's mail drop is performed.
 .SS "Example Delivery File"
 To summarize, here's an example delivery file:
 .PP
 .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
 default   \-        file    ?       mailbox
 
 # always run rcvtty
-*         \-        pipe    R       %libdir%/rcvtty
+*         \-        pipe    R       %nmhlibexecdir%/rcvtty
 .fi
 .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
 .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,49 +354,54 @@ failed.
 .PP
 In order to avoid any time limitations, you might implement a process
 that began by
 .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
 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.
-
+quicker delivery into your mail drop.
 .SH FILES
 .fc ^ ~
 .nf
 .SH FILES
 .fc ^ ~
 .nf
-.ta \w'%etcdir%/ExtraBigFileName  'u
-^%etcdir%/mts.conf~^nmh mts configuration file
-^$HOME/\&.maildelivery~^The file controlling local delivery
-^%etcdir%/maildelivery~^Rather than the standard file
-^%mailspool%/$USER~^The default maildrop
+.ta \w'%nmhetcdir%/ExtraBigFileName  'u
+^%nmhetcdir%/mts.conf~^nmh mts configuration file
+^$HOME/.maildelivery~^The file controlling local delivery
+^%nmhetcdir%/maildelivery~^Rather than the standard file
+^%mailspool%/$USER~^The default mail drop
 .fi
 .fi
-
 .SH "SEE ALSO"
 .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 '
 .RB ` \-nosuppressdup '
 .SH DEFAULTS
 .nf
 .RB ` \-noverbose '
 .RB ` \-nosuppressdup '
-.RB ` \-maildelivery "' defaults to $HOME/\&.maildelivery"
-.RB ` \-mailbox "' deaults to %mailspool%/$USER"
+.RB ` \-maildelivery "' defaults to $HOME/.maildelivery"
+.RB ` \-mailbox "' defaults to %mailspool%/$USER"
 .RB ` \-file "' defaults to stdin"
 .RB ` \-file "' defaults to stdin"
+.RB ` \-addr "' defaults to the current user"
 .RB ` \-user "' defaults to the current user"
 .fi
 .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 CONTEXT
 None
-
 .SH HISTORY
 .SH HISTORY
-.B Slocal
+.B slocal
 was originally designed to be backward-compatible with
 the
 .B maildelivery
 facility provided by
 .BR MMDF-II .
 Thus, the
 was originally designed to be backward-compatible with
 the
 .B maildelivery
 facility provided by
 .BR MMDF-II .
 Thus, the
-.RI \*(lq \&.maildelivery \*(rq
+.RI \*(lq .maildelivery \*(rq
 file syntax is somewhat limited.  But
 .B slocal
 has been modified and extended, so that is it no longer compatible with
 file syntax is somewhat limited.  But
 .B slocal
 has been modified and extended, so that is it no longer compatible with
@@ -423,12 +420,11 @@ interpreted as the
 value
 .B RP_MECH
 (200), which means
 value
 .B RP_MECH
 (200), which means
-\*(lquse an alternate route\*(rq (deliver the message to the maildrop).
-
+\*(lquse an alternate route\*(rq (deliver the message to the mail drop).
 .SH BUGS
 Only two return codes are meaningful, others should be.
 .PP
 .SH BUGS
 Only two return codes are meaningful, others should be.
 .PP
-.B Slocal
+.B slocal
 was originally designed to be backwards-compatible with the
 .B maildelivery
 functionality provided by
 was originally designed to be backwards-compatible with the
 .B maildelivery
 functionality provided by