Article View: comp.mail.mush
Article #121Re: Posting news from Mush
From: Barton E. Schaefer
Date: Sun, 06 Aug 1989 04:52
Date: Sun, 06 Aug 1989 04:52
79 lines
3721 bytes
3721 bytes
On Aug 5, 11:22pm, John Lacey wrote:
} Subject: Posting news from Mush
}
} I am using the recently posted Rnmush, which I enjoy alot. Is it possible
} to set up the analogous action from within Mush, that is, to be able to
} both reply to folder messages, and follow-up folder messages to newsgroups,
} as is done in rn?
It it not possible to actually read news using mush. However, it should
be possible to post from mush, and to follow up to news articles that
have been saved in a folder by a regular newreader (such as rn).
} Ideally, if I say "follow-up" (or some such), the program could check
} for the presence of a "Newsgroup(s):" or "Follow-up" header and find
} the appropriate newsgroup, or it those headers did not exist, prompt
} me for the newsgroup.
A follow-up command could be created by writing a script of mush commands
and using the "cmd" aliasing facility:
cmd followup "source mush-followup-script"
Testing for the existence of a Newsgroups: line in the current message is
fairly easy:
pick -r . -h Newsgroups: . | set has_newsgroups
if "X$has_newsgroups" == X
# No Newsgroups line
else
# Has a Newsgroups line
endif
However, getting mush to copy those Newsgroups to the new message is a
lot harder. The easiest thing is probably to do
set reply_to_hdr = Newsgroups
reply
This puts the newsgroups on the To: line, which might look a little
funny, but since some other cleanup is still needed (see below) there
isn't a problem.
} I would also like to be able to include the
} current message (i.e., I would like a -i switch).
Taken care of. :-) Just use "reply -i" above instead of "reply".
} Has anything like this be, and if not, how difficult would it be to modify
} mush to add a new command, and modify Pnews to an appropriate Pmush script?
If you modified Pnews, you wouldn't need a new mush command; Pnews could
initialize everything and then run mush. That's what Rnmush does. Doing
it from within mush is a better idea.
} Any hints?
One minor problem is mush's insistence that every message have a To:
line. News articles don't need one. So, you put the newsgroups on the
To: line (see reply_to_hdr trick above) and have a short script that
transforms the To: line into a Newsgroups: line and passes the message
on to "inews -h". Mush uses that script via "set sendmail".
This also takes care of the problem of getting mush to talk to the news
system. When sending a message, mush wants to start up the mail transfer
agent and copy the outgoing message to it. On sites that use sendmail or
smail or the like, the "inews -h" command has syntax that is close enough
to the MTA that posting could almost be "set sendmail='inews -h'". Sites
that run MMDF will have more problems; they will probably have to write a
script that accepts MMDF syntax as input and produces inews syntax as
output. This script can be combined with the one that transforms To:
into Newsgroups:, and then everybody is happy.
Anybody wanna volunteer to write it?
--
Bart Schaefer "And if you believe that, you'll believe anything."
-- DangerMouse
CSNET / Internet schaefer@cse.ogc.edu
UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer
Technical Details
Message-ID:
<8908060452.AA28363@cse.ogc.edu>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!jtsv16!uunet!tut.cis.ohio-state.edu!bloom-beacon!CSE.OGC.EDU!schaeferShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!jtsv16!uunet!tut.cis.ohio-state.edu!bloom-beacon!CSE.OGC.EDU!schaefer From: schaefer@CSE.OGC.EDU (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: Posting news from Mush Message-ID: <8908060452.AA28363@cse.ogc.edu> Date: 6 Aug 89 04:52:56 GMT Organization: The Internet Lines: 79