🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #2003

Mail alias expander

#2003
From: Scott Hannahs
Date: Wed, 21 Aug 1991 14:24
39 lines
2184 bytes
The man page for nn states that " Notice: currently there are no alias
expanders delivered with nn."  And since a inherently poor memory on my
part makes it tough to remember an actual address, I hacked together the
following script to look up aliases in my .mailrc file and substitute
the actual address for the alias.

Put the following script somewhere reasonable (perhaps
/usr/local/lib/nn) and set execute permission.  Set the init file so
that the variable nn is set to this program.  Enjoy.
-------------------------- Cut Here ---------------------------------------
#!/bin/sh
# mail-alias, expands aliases from your .mailrc file for nn
# Written by Scott Hannahs, Bitter National Magnet Lab, MIT, August 1991
# Complaints, comments, ideas to sth@slipknot.mit.edu
# tested on Silicon Graphics, IRIX 3.3.1

TMP_DIR=/usr/tmp
ADDRESS_LIST=""
ALIAS_LIST=`head -1 $1 | sed -e s/To://`
for ALIAS in $ALIAS_LIST ; do
  ADDRESS=`grep '^[ 	]*alias[ 	]'"$ALIAS"'[ 	]' ${HOME}/.mailrc |\
  sed -e s/'^[ 	]*alias[ 	]'"$ALIAS"'[ 	]'//`
  if [ "$ADDRESS" ] ; then
    ADDRESS_LIST="$ADDRESS_LIST $ADDRESS"
  else
    ADDRESS_LIST="$ADDRESS_LIST $ALIAS"
  fi
done
echo "To:${ADDRESS_LIST}" > ${TMP_DIR}/nn.alias.$$
tail +2 $1 >> ${TMP_DIR}/nn.alias.$$
mv -f ${TMP_DIR}/nn.alias.$$ $1
----------------------------- Cut Here -------------------------------------
random lines for the line eater
a
r
g
h
h
h
Technical Details
Message-ID: <sth.682784646@slipknot>
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!gmdzi!unido!math.fu-berlin.de!ox.com!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!bloom-picayune.mit.edu!slipknot!sth

Show Full Headers
Complete Article Headers
Message-ID: <sth.682784646@slipknot>
Subject: Mail alias expander
Date: Wed, 21 Aug 1991 14:24:06 +0000
From: sth@slipknot.mit.edu (Scott Hannahs)
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!gmdzi!unido!math.fu-berlin.de!ox.com!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!bloom-picayune.mit.edu!slipknot!sth
Newsgroups: news.software.nn
Summary: Those pesky aliases
Keywords: nn, newsreaders
Sender: news@athena.mit.edu (News system)
Organization: Massachvsetts Institvte of Technology
Lines: 39
Nntp-Posting-Host: slipknot.mit.edu