🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #4057

Re: Way to use news-record with MH format folders????

#4057
From: Tom McCain
Date: Thu, 15 Apr 1993 00:12
63 lines
2623 bytes
jab@hpuerca.atl.hp.com (Alan Barrow) writes:

: Hello All,

: Unless I have misunderstood the manual, there is no way to save oubound
: mail and articles (news-record and mail-record) in MH format folders.

: I have my init file set up so that read articles save correctly with 
: MH folders, but setting news-record to +/outbound_arts/* results in 
: a mailx format file being created called "*".

: Did I miss something?

Try this.  Set the following in your ~/.nn/init file

set mail-record 		~/Mail/news.out
set mail-script			/home/dynamo/tom/bin/mail-script
set news-record 		~/.nn/news.out

Next put the included script in your executable (bin) directory.

  #!/bin/sh
  
  # Obtain value of $WORK and $RECORD
  . ${HOME}/.nn/.param
  
  # Append Fcc: +folder to headers.  The folder is specified in
  # mail-record.
  if [ "$RECORD" != "" ]; then
	awk '
	{
		if ($0 == "" && !done) {
			print "Fcc: +'$RECORD'";
			done = 1;
		}
		print;
	}' $WORK > /tmp/aux.$$ && mv /tmp/aux.$$ $WORK
  fi
  
  # Compose and send the mail
  comp -form $WORK

Then, if you have the ability to use cron via a crontab you can
execute the following from cron.  I sure the same can be accomplished
with "at".  I just prefer cron.  This will cause MH to inc your
news.out file into a MH folder called +news.out.

#!/bin/csh

/usr/ecn/mh/inc -file ~/.nn/news.out +news.out && rm -f ~/.nn/news.out


If this works as well for you as it does for me, you'll be very happy.
Bill Wohler deserves most of the thanks for this.  I simply tested it
for him.  I added the cron bit for myself.  Let me know if you have
troubles making it work.

--tom
--
        Tom McCain         tom@dynamo.ecn.purdue.edu         pur-ee!tom         

 A diplomat is a man who can convince his wife she'd look stout in a
 fur coat.
Technical Details
Message-ID: <tom.734832723@dynamo.ecn.purdue.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!newsserver.jvnc.net!darwin.sura.net!rouge!wupost!emory!gatech!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!dynamo.ecn.purdue.edu!tom
References: <C5HyFz.JBq@hpuerca.atl.hp.com>

Show Full Headers
Complete Article Headers
Message-ID: <tom.734832723@dynamo.ecn.purdue.edu>
Subject: Re: Way to use news-record with MH format folders????
Date: Thu, 15 Apr 1993 00:12:03 GMT
From: tom@dynamo.ecn.purdue.edu (Tom McCain)
References: <C5HyFz.JBq@hpuerca.atl.hp.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!newsserver.jvnc.net!darwin.sura.net!rouge!wupost!emory!gatech!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!dynamo.ecn.purdue.edu!tom
Newsgroups: news.software.nn
Keywords: mh nn
Sender: news@noose.ecn.purdue.edu (USENET news)
Organization: Purdue University, West Lafayette, IN
Lines: 63