🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
1 messages
1 total messages Started by Phil Kernick Mon, 19 Aug 1991 08:08
Using elm to do the posting from nn
#1993
Author: 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 |
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads