[comp.mail.mh] help, please

jdm@gssc.UUCP (John D. Miller) (01/04/89)

i recently switched over to mh from Mail and have a few questions:

	1. i want to save a copy of ALL my outgoing mail. analagous to the
	"save" option for Mail in .mailrc

	2. i also us rn and would like to be able to save articles in a format
	that can be used by mh.  i already use the option that saves articles
	as discrete files, but they are not mh format.  i used to use the
	rn option that saved articles in an amorphous file (by newsgroup),
	which let me view them with Mail.

thanks,

-- jdm
-- 
...!{tektronix!verdix}!sequent!gssc!jdm                John D. Miller
(503) 641-2200                                         Graphic Software Systems
* From you, I get opinions  *                          9590 S.W. Gemini Dr.
* From you, I get the story *                          Beaverton, OR  97005

ed@cardiology.ummc.umich.edu (Ed Anselmo) (01/05/89)

In article <5816@gssc.UUCP> jdm@gssc.UUCP (John D. Miller) writes:
>i recently switched over to mh from Mail and have a few questions:
>
>	1. i want to save a copy of ALL my outgoing mail. analagous to the
>	"save" option for Mail in .mailrc
>

Use Fcc: +outbox.  My .mh_profile has

comp:           -form /usr/ed/.mh_signature
repl:           -fcc +outbox -editor /usr/ucb/vi -nocc all -filter repl.filter

which puts a File Carbon Copy of all my outgoing mail (except forwards, I
guess) in my outbox folder. My .mh_signauture file looks like:

To:
cc:
Fcc: +outbox
Subject:
--------
---
Ed Anselmo                      internet: ed@cardiology.ummc.umich.edu
University Hospital             uucp    : {uunet,ames,rutgers}!umix!clip!ed
University of Michigan          voice   : (313) 936-5570

(basically there to add a signature to the end of my mail.)

Hope this helps.
---
Ed Anselmo                      internet: ed@cardiology.ummc.umich.edu
University Hospital             uucp    : {uunet,ames,rutgers}!umix!clip!ed
University of Michigan          voice   : (313) 936-5570

denise@cwi.nl (Denise L. Draper) (01/05/89)

In article <5816@gssc.UUCP> jdm@gssc.UUCP (John D. Miller) writes:
>	2. i also us rn and would like to be able to save articles in a format
>	that can be used by mh.  i already use the option that saves articles
>	as discrete files, but they are not mh format.  i used to use the
>	rn option that saved articles in an amorphous file (by newsgroup),
>	which let me view them with Mail.

Just in case various people might find this useful, I thought
I'd post my little macro:

	@m  |sed -f .mhstrip|rcvstore +

You complete the invocation with the folder name to store the article
in.  The file .mhstrip resides in my News directory (%p in rn-ese),
and has the following contents:

--- cut here ---
/^$/,$b
/^From /d
/^Relay-/d
/^Posting-/d
/^Path:/d
/^Article-/d
/^Lines:/d
/^Xpath:/d
/^Xref:/d
/^Distribution/d
/^Date-Received:/s//Date:/
/^Approved:/d
/^Expires:/d
/^>From:/s//From:/
/^From:/s/From: \([^ ][^ ]*\) (\([^)][^)]*\))/From: \2 <\1>/
/^Subject:/s/:/: (Net)/
--- cut here ---

Many of the lines are optional, and just get rid of junk that
I don't want to see, but the three `From' lines are necessary,
as is the Date-Received line.

Denise Draper						 denise@cwi.nl
Centrum voor Wiskunde en Informatica		...!uunet!mcvax!denise

matt@ODDJOB.UCHICAGO.EDU (Matt Crawford) (01/06/89)

> 	2. i also us rn and would like to be able to save articles in a format
>	that can be used by mh.

When I used rn I made the following in my ~/.rnmac file:

	# inc an article into an mh folder.  note that !! commands seem to be
	# executed in the /usr/spool/news/%c directory
	i	%(%m!=n?!!inc -file %a :)

It probably won't work if you use rrn.  But in that case you could
adapt the function I use under gnews:

	(require 'mh-e)
	(defvar gnews-mh-default-folder "articles"
	  "*Default folder for gnews-mh-save-article")

	(defun gnews-mh-save-article (arg)
	  "Save current article in gnews-mh-default-folder, or prompt for folder
	if ARG is non-nil."
	  (interactive "P")
	  (shell-command-on-region
	   (point-min)
	   (point-max)
	   (concat mh-lib
		   "rcvstore +"
		   (if arg (mh-prompt-for-folder
			    (format "Save in folder [+%s] +" gnews-mh-default-folder)
			    gnews-mh-default-folder
			    t)
		     gnews-mh-default-folder))))

leres@ace.ee.lbl.gov (Craig Leres) (01/06/89)

John D. Miller writes:
> 	2. i also us rn and would like to be able to save articles in a format
> 	that can be used by mh.  i already use the option that saves articles

Rather than using inc (which does locking that you don't want/need) I
wrote the following script:

	#!/bin/csh -f
	#
	# rntomh
	#
	# Arguments:
	#   %C  newsgroup name, dot form
	#   %a  article number
	#
	# Stdin:
	#   the article to save

	set folder=+news
	( echo "Article: $2 of $1" ; cat ) | /usr/new/lib/mh/rcvstore $folder

	echo Saved article $2 of $1 to $folder.

After adding the following line to your .rnmac:

	s       s|rntomh %C %a^J	(uparrow-J seems to work here)

Typing 's' cause the current article to be stored as the last message
in the folder news. Note that I also use -N (non-mailbox format) with
rn. Not sure if this is important.

		Craig

news@bellcore.bellcore.com (news) (01/10/89)

$HOME/.rninit.  Here is my .rninit file:
From: tr@pcharming.ctt.bellcore.com (tom reingold)
Path: pcharming!tr

-i=1 "-F\$ " -S -t -v -N -T -r
-hnewsgroups -hfollowup-to -hunrecognized -hdistribution -hsender -hmessage-id -hreply-to -hreferences -hX-
-ESAVEDIR=%~/Mail/%C
-ESAVENAME=%a
-EMAILHEADER='To: %T, %t
Subject: %S
Newsgroups: %n
Organization: %o
Cc:
Fcc: outbox

'
-EYOUSAID='In %n, on the subject of "%s", you said:
'
-ESUBJLINE='%s {%t}'
-EATTRIBUTION='On the subject of \"%s\", %f writes:
'

So this saves articles in Mail/<newsgroup>/<article_num>.  Then every
so often, I sortm the folders.

Tom Reingold
PAPERNET:                      |INTERNET:       tr@bellcore.bellcore.com
Bell Communications Research   |UUCP-NET:       bellcore!tr
444 Hoes La room 1H217         |SOUNDNET:       (201) 829-4622 [work],