Xref: utzoo comp.mail.mh:1278 comp.windows.x:30075 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!rutgers!uwm.edu!rpi!bu.edu!purdue!haven!decuac!bacchus.pa.dec.com!hollie.rdg.dec.com!decvax.DEC.COM!evans From: evans@decvax.DEC.COM (Marc Evans) Newsgroups: comp.mail.mh,comp.windows.x Subject: Re: MH and Xrn Message-ID: <458@decvax.decvax.dec.com.UUCP> Date: 29 Nov 90 12:46:39 GMT References: <1990Nov28.103054@ap.co.umist.ac.uk> Sender: news@decvax.dec.com.UUCP Reply-To: evans@decvax.DEC.COM Followup-To: comp.mail.mh Organization: Synergytics Lines: 67 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 =========================================================================== Brought to you by Super Global Mega Corp .com