[news.software.b] How to send mail to C news

dce@sony.com (David Elliott) (10/20/89)

In B news, it is fairly simple to set up an alias to send mail to
newsgroups.  You just pipe the mail through a sed script to change
leading '>'s to ']' (or something - you have to get by the inews
prevention scheme) and through uurec (or recnews, I forget which).

How is this done in C news?

David Elliott
dce@sony.com | ...!{uunet,mips}!sonyusa!dce

kayvan@mrspoc.Transact.COM (Kayvan Sylvan) (10/21/89)

>>>>> "David" == David Elliott <dce@sony.com> writes:

David> In B news, it is fairly simple to set up an alias to send mail to
David> newsgroups.  You just pipe the mail through a sed script to change
David> leading '>'s to ']' (or something - you have to get by the inews
David> prevention scheme) and through uurec (or recnews, I forget which).

David> How is this done in C news?

I just went through this myself in order to set up bidirectionally
gatewayed local newsgroup<->mailing lists. The contrib/nntpmail/mailing_lists
directory contains some scripts that it was easy to tailor to my system.

I ended up with a line in my sys file:

local.accell:local.accell/all::/usr/local/lib/mail/mailgateway accell

and a line in my (smail3.1 - sendmail compatible) aliases file:

accell: "|/usr/local/lib/mail/distribute -n local.accell", accell-people

If you can't get this to work, mail me and I'll send you more information.

			---Kayvan
-- 
Kayvan Sylvan @ Transact Software, Inc. -*-  Los Altos, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan
= Interested in story telling group? Mail yarn-spinners-request@transact.com =

henry@utzoo.uucp (Henry Spencer) (10/22/89)

In article <1989Oct20.145715.5182@sony.com> dce@icky.sony.com (David Elliott) writes:
>In B news, it is fairly simple to set up an alias to send mail to
>newsgroups.  You just pipe the mail through a sed script to change
>leading '>'s to ']' (or something - you have to get by the inews
>prevention scheme) and through uurec (or recnews, I forget which).
>
>How is this done in C news?

Please read the newsmail(8) manual page of C News, which contains
considerable information on the subject.  (In particular, C News has
a uurec equivalent.)  There is more elaborate news-via-mail stuff in
the contrib directory, but it's not necessary for something like this.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

tale@pawl.rpi.edu (David C Lawrence) (10/23/89)

In <1989Oct20.145715.5182@sony.com> dce@icky.sony.com (David Elliott) writes:
DE> In B news, it is fairly simple to set up an alias to send mail to
DE> newsgroups.

In <1989Oct21.225543.22780@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
Henry> Please read the newsmail(8) manual page of C News, which contains
Henry> considerable information on the subject.

Does it?  It seems like what he wants is a mail->news gateway, like
Karl has set up for the gnu mailing lists and I have for some other
lists around here.  What I get out of the newsmail manual page is that
is for transferring news through mail systems, not for putting
"regular" mail messages into USENET newsgroups.  Am I misunderstanding
the manual page in some way?

Dave
-- 
 (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))

henry@utzoo.uucp (Henry Spencer) (10/23/89)

In article <1989Oct23.063040.25063@rpi.edu> tale@pawl.rpi.edu (David C Lawrence) writes:
>Henry> Please read the newsmail(8) manual page of C News...
>
>Does it?  It seems like what he wants is a mail->news gateway...
>... What I get out of the newsmail manual page is that
>is for transferring news through mail systems, not for putting
>"regular" mail messages into USENET newsgroups.  Am I misunderstanding
>the manual page in some way?

The documentation is written in terms of using mail to transfer news, but
there is no reason why a mail message with the proper headers can't be fed
into news that way.  He asked for a uurec equivalent; that's what that
stuff is.

If you want something that will edit headers for you, *then* you need to
look in contrib.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

brb@myrias.com (Brian Baird) (10/25/89)

The newsmail(8) man page deals with transmitting news over mail links,
not with gatewaying mailing lists into news groups.  It is not
entirely clear from David Elliott's original posting which he is
trying to do.

Here's how I gateway about half a dozen mailing lists here.  The stuff
in contrib seemed a bit overpowered for what I wanted.

#! /bin/sh
# mailtonews newsgroup [approved-by]
#
# Inject a mail-list message into the given newsgroup with no fuss.
# Typical use is to have a moderated group for the info-foo mail
# list called "mail.info-foo".  Add an appropriate line to the mailpaths
# file, then add the following alias to /usr/lib/aliases:
#
#	info-foolist:		"|/usr/lib/news/bin/mailtonews mail.info-foo"
#	owner-info-foolist:	news
#
# Brian Baird	brb@myrias.com

# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN/inject:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH; export PATH

pref=/tmp/m2n$$
hdr=${pref}hdr
body=${pref}body

sed 1d | tear $pref
lines="`sed 1d $body | wc -l`"
{
	echo Newsgroups: $1
	echo Path: ${USER-news}
	egrep -v '^Newsgroups:' $hdr
	echo Approved: ${2-news@`cat $NEWSCTL/mailname`}
	echo Lines: $lines
	cat $body
} | relaynews

rm $hdr $body
exit
--
Brian Baird				brb@myrias.com
Myrias Research, Edmonton		{uunet,alberta}!myrias!brb