jf@ap.co.umist.ac.uk (John Forrest) (11/28/90)
Does anyone know how to set things up so that when mailing from inside Xrn (or rn for that matter) you can pass things through the mh send/post programs rather than directly to sendmail. I'd like to arrange to put Fcc entries in the mail going out so that I keep records of what I send. John Forrest Dept of Computation UMIST.
evans@decvax.DEC.COM (Marc Evans) (11/29/90)
In article <1990Nov28.103054@ap.co.umist.ac.uk>, jf@ap.co.umist.ac.uk (John Forrest) writes: |> Does anyone know how to set things up so that when mailing from inside Xrn (or rn |> for that matter) you can pass things through the mh send/post programs rather |> than directly to sendmail. I'd like to arrange to put Fcc entries in the mail |> going out so that I keep records of what I send. Start by adding the following resource: XRnMotif.Mailer: $HOME/bin/xrnmail And then put the following script in the file refered to above: #!/bin/sh # # This shell script is designed to read mail from either standard input or # from 1 or more files supplied as arguments, and send the contents to the # program mh/send (/usr/new/mh/send on ULTRIX). If no arguments are specified # then standard input is read. Otherwise, the arguments are assumed to be # valid pathnames of files to be individually sent. # # This script is primarily useful in conjunction with programs which send # mail via standard output, and the user typically use the mhmail facilities # for sending mail (this includes DECwindows /usr/bin/dxmail program). An # example program would be xrn, which is an X windows based netnews reader. # mhmail=${MAILER-/usr/new/mh/send} mdir="" argv="$*" if [ $# = 0 ] ; then argv="-" ; fi # c="`grep '^Path:' $HOME/.mh_profile | sed 's/^Path:[ ]*//'`" if [ "$c" != "" ] ; then dirs="$HOME/$c $c $HOME/Mail /usr/tmp" else dirs="$HOME/Mail /usr/tmp" fi for i in $dirs ; do if [ -d $i -a -w $i ] ; then mdir=$i break fi done # if [ ! -d "$mdir" -a -w "$mdir" ] ; then echo "Can't determine directory in which to create draft message. Aborting" exit 1 fi if [ ! -f "`echo $mhmail | sed 's/[ ].*//'`" ] ; then echo "Program '$mhmail' is not available. Aborting" exit 1 fi # umask 077 for i in $argv ; do cat $i >$mdir/draft.$$ && $mhmail $mdir/draft.$$ done exit 0 This is all documented in the distribution of xrn... - Marc -- =========================================================================== Marc Evans - WB1GRH - evans@decvax.DEC.COM | Synergytics (603)635-8876 Unix and X Software Contractor | 21 Hinds Ln, Pelham, NH 03076 ===========================================================================
mikey@sgi.com (Mike Yang) (12/02/90)
In article <1990Nov28.103054@ap.co.umist.ac.uk> jf@ap.co.umist.ac.uk (John Forrest) writes: >Does anyone know how to set things up so that when mailing from inside Xrn (or rn >for that matter) you can pass things through the mh send/post programs rather >than directly to sendmail. I'd like to arrange to put Fcc entries in the mail >going out so that I keep records of what I send. For xrn, you can set XRn*mailer and/or XRnMotif*mailer to something other than "/usr/lib/sendmail ..." which is the default. Don't know how to fix rn. ----------------------------------------------------------------------- Mike Yang Silicon Graphics, Inc. mikey@sgi.com 415/335-1786