Great Circle Associates Majordomo-Workers
(November 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Resend man page
From: "Shane P. McCarron" <ahby @ themacs . com>
Date: Fri, 29 Nov 1996 12:10:30 -0600 (CST)
To: majordomo-workers @ greatcircle . com

While I was updating resend to handle sequence numbers (as per
requests in this list) I decided to write a resend man page.  Here it
is in a shar. Please look it over and send comments to this mailing
list.

Basically I took the text from the original resend README file and
augmented it with a detailed breakdown of all the options, arguments,
and operands.

Chan, please consider incorporating this man page (or a subsequent
version of it) into the next patch update.


#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1996-11-29 12:08 CST by <ahby@spm.themacs.com>.
# Source directory was `/usr2/ahby/src/majordomo-1.94/Doc/man'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   6708 -rw-r--r-- resend.1
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh08971; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= resend.1 ==============
if test -f 'resend.1' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'resend.1' '(file already exists)'
else
  $echo 'x -' extracting 'resend.1' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'resend.1' &&
X.TH resend 1
X.SH NAME
resend \- resend messages after evaluation
X.LP
X.SH SYNOPSIS
X.B resend 
X.B [\-A]
X.B [\-C config-file]
X.B [\-I file-list]
X.B [\-M max-msg-length]
X.B [\-N]
X.B [\-R]
X.B [\-a passwd]
X.B [\-d]
X.B [\-f from-addr]
X.B [\-h host-name]
X.B \-l list-name
X.B [\-n]
X.B [\-p precedence]
X.B [\-r reply-to]
X.B [\-s]
X.B destination
X.LP
X.SH AVAILABILITY
Provided with distributions of Majordomo.
X.LP
X.SH DESCRIPTION
X.B resend
is a perl script that is usually used to redirect mail messages to
a mailing list after evaluating and parsing the headers. Mail is
"resent" by handing it off to the mailer again with an alternate
destination as specified by the final operand.
X.LP
Any message that 
X.B resend
doesn't like is sent to the list owner (the
"-f" address, or "<list-name>-owner" if -f isn't used) along with a
comment indicating what "resend" didn't like about it.  To go ahead
and send the message, just feed it to resend without the flag that
caused it to reject it (in other words, if it rejected it because it
was too long, omit the "-M <>" flag; if it rejected it because it was
administrivia, omit the "-s" flag).
X.LP
If you specify "-a <passwd>" flag, this "approval" password can be
used in an "Approved: <passwd>" line to override most of the other
checks (those enabled by "-s", "-M", and so forth).  The "Approved:
<passwd>" line can either be one of the mail headers, or the first
line of the body of the message.  If it is in the headers, the rest
of the headers are resent as part of the approved message.  If it is
in the body, the current headers are discarded in favor of the headers
from the original message which should follow the "Approved:" line in
the body.
X.LP
The owner of a mailing list can thus post messages that were initially
bounced by adding an "Approved: <passwd>" line and resubmitting the
message.  Any "Approved: <passwd>" line is stripped before the message
is sent to the mailing list, so that list members won't learn the
password.  If the <passwd> argument to the "-a" flag begins with a "/",
it is assumed to be a file name from which the actual password is read.
X.LP
You can make a list "moderated" by specifying the "-A" flag.  If the
"-A" flag is set, then any messages not containing a valid "Approved:"
line are sent to the list owner, rather than the whole list.; the
list owner can then review the message, add an appropriate "Approved:"
line, and resubmit them (these last two steps can be done easily with
the "approve" command that comes with Majordomo).  If you specify
the "-A" flag, you must also specify the "-a <passwd>" flag, so that
resend knows what approval password to use.
X.LP
If you only want to accept messages from members of a list, you can
use the "-I <file-list>" flag to do this.  "<file-list>" should be a
colon-separated list of files in the $listdir directory (specified in
the config file) that "resend" will check the address in "From:" line
of a message against.  If the address doesn't show up in one of those
files, and the message doesn't have a valid "approved" header on it,
it will be bounced to the list owner.
X.LP
X.SH OPTIONS
The following options can be used with resend:
X.LP
X.TP 10
X.B \-A
Approve; enable list moderation by requiring an Approved: header to be
present in the message before resending. Messages without an Approved:
header will be redirected to the list owner for approval.
X.TP
X.B \-C config-file
Alternate configuration file; tell resend to use the file
X.TP
X.B config-file
instead of the default list-name.config.
X.TP
X.B \-I file-list
Include; ensure that the message sender (as represented in the From:
line of the incoming message) is in one of the file(s) specified in
X.BR file-list .
X.B file-list
may contain multiple colon separated pathnames. Each pathname should
point to a file that contains a sendmail-style mailing list.
X.TP
X.B [\-M max-msg-length]
Maximum; Specify the maximum length of the relayed message in octets.
X.TP
X.B [\-N]
Number and archive; Add a sequence number to each message as specified
in
X.B \-n 
below. In addition, store each relayed message in the directory
lists/list-name$filedir_suffix as specified in the 
X.B majordomo.cf
file. The messages are stored as a single message per file, using the
sequence number of the message as the file name. Finally, a
per-mailing-list index in the files INDEX and index.html is updated
with information about the newly archived message.
X.TP
X.B [\-R]
Delete the "Received:" lines in the incoming message header. This can
make the relayed messages considerably shorter at the expense of
losing some potentially interesting debugging information.
X.TP
X.B [\-a passwd_file]
Specify the pathname of the file containing the approval password for
the list. This password is used to check Approved: headers when
relaying messages to lists that are marked as moderated through the 
X.B \-A
option above.
X.TP
X.B [\-d]
Debug; print what would be done, but don't do it.
X.TP
X.B [\-f from-addr]
Set the From: address to
X.B from-addr
X.TP
X.B [\-h host-name]
Set the name of the local host to
X.BR host-name .
This name will be used in the From: and To: lines when updating the
headers.
X.TP
X.B \-l list-name
Specify the name of the mailing list as 
X.BR list-name .
This option is required, as
X.B resend 
uses this name to derive the names
of many other files.
X.TP
X.B [\-n]
Assign a sequence number to each message as it comes through. The next
sequence number is stored in the file lists/list-name.seq. If the
string $SEQNUM is found in the $subject-prefix configuration variable,
it is replaced with the current sequence number. Thus, a
$subject_prefix of "($LIST $SEQNUM)" would render a Subject: line of
(list-name sequence-number).
X.TP
X.B [\-p precedence]
Set the Precedence: header to 
X.BR precedence .
X.TP
X.B [\-r reply-to]
Set the Reply-To: header to
X.BR reply-to .
X.TP
X.B [\-s]
Administrivia; Search the message for strings commonly found in
administrative messages send to majordomo mailing lists (e.g.
subscribe, unsubscribe). If these are found in the first 10 or so
lines of the message, the message will be relayed to the list owner
instead of being sent on to the mailing list.
X.SH OPERANDS
X.TP 10
X.B destination
The alias to which to redirect the message if it is a proper list
submission.
X.LP
X.SH CONFIGURATION
X.LP
X.SH FILES
X.PD 0
X.TP 20
X.B /etc/aliases
X.TP
X.B /etc/majordomo.cf
X.TP
X.B lists/list-name.config
X.PD
X.LP
X.SH SEE ALSO
X.B majordomo(8),approve(1)
X.LP
X.SH AUTHOR
Majordomo and most of the ancillary perl code was written by
Brent Chapman <brent@GreatCircle.COM>.
Majordomo is available via anonymous FTP
from FTP.GreatCircle.COM, in the directory pub/majordomo.  This 
man page was written by Shane McCarron <ahby@themacs.com>.
SHAR_EOF
  $shar_touch -am 1129120896 'resend.1' &&
  chmod 0644 'resend.1' ||
  $echo 'restore of' 'resend.1' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'resend.1:' 'MD5 check failed'
c9c49dcef5478cd8122bb20e322c7a0d  resend.1
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'resend.1'`"
    test 6708 -eq "$shar_count" ||
    $echo 'resend.1:' 'original size' '6708,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh08971
exit 0
-- 
Shane P. McCarron					Inet: shane@themacs.com
Project Manager, The MACS, Inc.				Phone: +1 612 434-4431

Indexed By Date Previous: Re: Weird behavior with To: header
From: Ajay Kochhar <kochhar@ari.ari.net>
Next: approve perl script - addition suggestion
From: molivier@senor.engr.sgi.com (Michael Olivier)
Indexed By Thread Previous: Re: Weird behavior with To: header
From: Ajay Kochhar <kochhar@ari.ari.net>
Next: approve perl script - addition suggestion
From: molivier@senor.engr.sgi.com (Michael Olivier)

Google
 
Search Internet Search www.greatcircle.com