[comp.mail.mh] two questions - deleted messages + MH as mailer with rn?

miller@uwovax.uwo.ca (Greg Miller) (09/12/90)

Hi!

I have two questions about using MH!

On deleting messages by using rmm, the message file is
renamed from "number" to ",number".

Is there a way to automatically get these files cleaned
from MH up and not left lying around?

Also, is it possible to use MH as the default mailer with rn
instead of Rnmail.  If so, how is this done?

Thanks!

  J G Miller                         telephone:  (519) 679-2111 extension 6325
  Room 024, Chemistry Building        InterNet:  <a4346@uwocc1.uwo.CA>
  University of Western Ontario       NetNorth:  <A4346@UWOCC1.BITNET>
  LONDON, Ontario, N6A 5B7            mailpath:  {uunet!watmath,utai}!ria!a4346

-------------------------------------------------------------------------------

marquard@rsasala..aix.kingston.ibm.com (Dave Marquardt) (09/13/90)

In article <6930.26ed0cda@uwovax.uwo.ca> J G Miller <miller@ria.ccs.uwo.CA> writes:
>On deleting messages by using rmm, the message file is
>renamed from "number" to ",number".
>
>Is there a way to automatically get these files cleaned
>from MH up and not left lying around?

Well, I run something like

	find $HOME/Mail -name ',*' -atime +1 -print | xargs rm

from my crontab once per night.  Works well, and if you accidentally
deleted a message in the last day you have a (small) chance to recover
it.

>Also, is it possible to use MH as the default mailer with rn
>instead of Rnmail.  If so, how is this done?

Yes, it is.  If you have access to the MH source, look in the
miscellany directory for something to do with rn.  For those who don't
have access to the MH source, try this:

In .profile (or the appropriate thing in .login or .cshrc), add this:

MAILHEADER='To: %t\
Subject: %(%i=^$?:Re: %S\
Newsgroups: %n\
In-Reply-To: %i)\
%(%[references]!=^$?References\: %[references]\
)Organization: %o\
\
'
MAILPOSTER="$HOME/bin/rnmail %h"
export MAILHEADER MAILPOSTER

rn uses MAILPOST and MAILHEADER when replying to articles with r or R.

And here's my $HOME/bin/rnmail:

#! /bin/sh

export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myse
lf to sh."; sh $0; kill $$)

cat=/bin/cat
echo=/bin/echo
test=/bin/test
defeditor=prompter

draftfile=`mhpath +`/rndraft
dotdir=${DOTDIR-${HOME-$LOGDIR}}

$cat $1 > $draftfile
if $test -f $dotdir/.signature; then
	$echo "--" >> $draftfile
	$cat $dotdir/.signature >> $draftfile
fi
exec comp -nodraftfolder -use -editor ${VISUAL-${EDITOR-$defeditor}} -file $draftfile

And that should do it.  Have fun!

-Dave

laurie@tira.uchicago.edu (Laurie Abbott) (09/14/90)

In article <3470@aix.aix.kingston.ibm.com> ibmps2!davem@uunet.uu.net writes:
+In article <6930.26ed0cda@uwovax.uwo.ca> J G Miller <miller@ria.ccs.uwo.CA> writes:
+>Also, is it possible to use MH as the default mailer with rn
+>instead of Rnmail.  If so, how is this done?
+
+Yes, it is.  If you have access to the MH source, look in the
+miscellany directory for something to do with rn.  For those who don't
+have access to the MH source, try this:

	[process for invoking MH in rn for replies deleted]

i asked the same question last year, and someone (i don't remember 
whom, but it was a very kind reader of this group) sent me the magic
line for your .cshrc, or (as i use it) your .rninit:

-EMAILPOSTER=\
"MHCONTEXT=/tmp/mhc.%L comp -form %h -editor ${VISUAL-${EDITOR-emacs}}"

this line, in connection with the fields that you set in the
envariable MAILHEADER, is all you need to use MH instead of Rmail
within rn.

--laurie

________________________________________________________________________
laurie@tira.uchicago.edu				       DoD #0023
abbo@midway.uchicago.edu                         uclabbo@uchimvs1.bitnet