🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #26484

Re: can slrn do this?

#26484
From: Bennett Todd
Date: Mon, 30 Sep 1996 00:00
58 lines
2204 bytes
On 27 Sep 1996 15:40:42 GMT, Olly Betts <olly@mantis.co.uk> wrote:
>You can't currently get mail replies saved automatically to a file, though
>it should be pretty trivial to add (the function to look at is
>slrn_mail_file() in misc.c).

I use a script I got from off the net, some time ago. It uses elm to send the
mail. The poster said they did it for getting elm's alias expansion. I adopted
it because I have elm configured to save copies of all messages I send in
folders by email address --- the same folders I'll be using to file replies I
receive. Another benefit I noticed recently is when I added

	hostname "nospam|interactive.net"

This script prevented that from messing with the mail messages --- it only
gets the postings.

So this script is hooked in via

	set sendmail_command "/home/bet/bin/newselm"

(adjust the path accordingly).

-Bennett

#!/bin/sh

TMPMAIL=$HOME/.newselm.$$

trap "rm -f $TMPMAIL; exit 1" 0 1 2 15

myexec=`awk -v q=\' '
  BEGIN{header=1}
  /^To: /{
	to=substr($0,5)
	sub("[(].*[)]","",to)
	sub("[ \t]","",to)
	sub(".*<","",to)
	sub(">.*","",to)
	gsub(q,"",to)
  }
  /^Subject: /{subj=substr($0,10)}
  /^$/ && header==1 {
	gsub(q,"",subj)
	header=0
	printf "elm -s %s%s%s %s%s%s", q,subj,q,q,to,q
	next
  }
  header==0 {print >tmpmail}
' tmpmail=$TMPMAIL -`

eval $myexec <$TMPMAIL || elm -s "newselm failed!" `whoami` <$TMPMAIL
rm -f $TMPMAIL
trap "" 0
exit 0


Technical Details
Message-ID: <slrn54vb8r.jdr.bet@onyx.interactive.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn54nttu.k1v.joeh@arakis.sugar-river.net> <slrn54ntbq.4a.olly@mantis.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <slrn54vb8r.jdr.bet@onyx.interactive.net>
Subject: Re: can slrn do this?
Date: Mon, 30 Sep 1996 00:00:00 +0000
From: bet@nospam|interactive.net (Bennett Todd)
References: <slrn54nttu.k1v.joeh@arakis.sugar-river.net> <slrn54ntbq.4a.olly@mantis.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 186205552
X-nntp-posting-host: onyx.interactive.net
Sender: news@interactive.net (System Administrator)
X-nntp-posting-user: bet
X-trace: 844082459/5307
Organization: IBS Interactive
Newsgroups: news.software.readers