🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #1993

Using elm to do the posting from nn

#1993
From: Phil Kernick
Date: Mon, 19 Aug 1991 08:08
91 lines
3222 bytes
For all of those that want to use elm to do the posting from inside nn,
this is a solution that I have come up with.

1.  Unshar this message to get the file nn_elm.  It is a shell script
    and should be put somewhere in your search path.  You must also have
    tail and elm in your search path.

2.  Add the lines:

        set   mailer              nn_elm
        unset mailer-pipe-input

    to your ~/.nn/init file.


Then when you forward an article to someone, you can use the elm alias
rather than the complete address.  The same is true for sending mail to
someone while in nn.

If you have the appropriate elm options set, this will also keep a copy
of your forwarded messages in your =sent folder.

The only limitation is that the only header line that is kept is the
Subject.  All other informational lines are discarded.  I did this
because it gives a simple solution, rather than a very complex one.


If you use this and find it useful, please drop me message to say so.


Phil Kernick.


------------------------------  cut here ---------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	nn_elm
# This archive created: Mon Aug 19 17:36:21 1991
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'nn_elm'
then
	echo shar: "will not over-write existing file 'nn_elm'"
else
cat << \SHAR_EOF > 'nn_elm'
#/bin/sh
#
# nn_elm
#
# 07 Aug 91             V1.0
#
# Massage a mail message from nn into a form that elm can use
# (c) 1991 Phil Kernick  Wizard Software
#

eval `awk '
BEGIN {
  FS = ":";
  dq = sprintf("%c", 34);

  headers = 0;
  to = "";
  subject = "";
}

/^.*: / {
  headers++;
  if($1 == "To")
    to = dq substr($0, 5) dq;
  if($1 == "Subject")
    subject = dq substr($0, 10) dq;
}

/^$/ {
    printf("tail +%d %s | elm -s %s %s > /dev/null\n", headers+2, mail, subject, to);
    exit;
}' mail=$1 $1`

exit $?
SHAR_EOF
chmod +x 'nn_elm'
fi
exit 0
#	End of shell archive
-- 
o|      ///   Phil Kernick             EMail:  phil@adam.adelaide.edu.au    |o
 |     ///    Departmental Engineer    Phone:  +61 8 228 5914               |
o| \\\///     Dept. of Psychology      Fax:    +61 8 224 0464               |o
 |  \///      University of Adelaide   Mail:   GPO Box 498 Adelaide SA 5001 |
Technical Details
Message-ID: <phil.682589295@adam.adelaide.edu.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!adam.adelaide.edu.au!phil

Show Full Headers
Complete Article Headers
Message-ID: <phil.682589295@adam.adelaide.edu.au>
Subject: Using elm to do the posting from nn
Date: Mon, 19 Aug 1991 08:08:15 +0000
From: phil@adam.adelaide.edu.au (Phil Kernick)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!adam.adelaide.edu.au!phil
Newsgroups: comp.mail.elm,news.software.nn
Sender: news@ucs.adelaide.edu.au
Followup-To: comp.mail.elm
Organization: University of Adelaide, South Australia
Lines: 91
Nntp-Posting-Host: adam.adelaide.edu.au