fsb@vitro.com (Steve Brailsford) (02/19/91)
I pass some news groups on to some people on another machine by sending it to them in mail. I just mail them from the sys file the groups they want to see. What I haven't figured out how to do is some way for them to post back to news. I see you can alias rnews in mail so that it calls recenews, but it seems what it gets much be bdecoded or have to N's in it. I tried to just send mail with the correct header info to rnews and it spooled it up ok, except it seems to just throw it away when newsrun runs. Do anyone do anything like this? -- Steve Brailsford (fsb@vitro.com) _____ Usenet: uupsi!vitro!fsb \/itro Corporation Compu$erve: 73427,1466 14000 Georgia Ave. Voice: (301) 231-1481 Silver Spring, MD 20906
henry@zoo.toronto.edu (Henry Spencer) (02/20/91)
In article <1991Feb18.214728.11667@vitro.com> fsb@vitro.com (Steve Brailsford) writes: >...What I haven't figured out >how to do is some way for them to post back to news. I see you >can alias rnews in mail so that it calls recenews, but it seems >what it gets much be bdecoded or have to N's in it... Recenews and friends are intended for transmitting news via mail from one news system to another, not for gatewaying mail messages into news. There is a popular illusion that gatewaying ought to be trivial; it's not. We do not provide a canned solution for it at this time. -- "Read the OSI protocol specifications? | Henry Spencer @ U of Toronto Zoology I can't even *lift* them!" | henry@zoo.toronto.edu utzoo!henry
matt@eecs.nwu.edu (Matt Larson) (02/28/91)
In article <1991Feb19.215942.23527@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes: |> Recenews and friends are intended for transmitting news via mail from one |> news system to another, not for gatewaying mail messages into news. There |> is a popular illusion that gatewaying ought to be trivial; it's not. We |> do not provide a canned solution for it at this time. We recently upgraded from B news to C news and we missed this B news feature right away: we have several mailing lists have an alias that invokes ``recnews'' to post an article to the corresponding local group. When I realized that C news had no analogue to recnews, I took a look through the B news source for recnews and decided that there was no reason that I couldn't run it under C news. I dropped the binary back into the library directory and things have been working fine. My question is: How do other sites handle the gatewaying of mail to newsgroups under C news? (Note that in our case the newsgroup name is known ahead of time and does not have to be determined by examining the mail message.) Am I asking for trouble using recnews from B news? Thanks for any input, -- Matt Larson, Distributed Systems Analyst Academic Computing and Network Services, Northwestern University matt@acns.nwu.edu (708) 491-5366
fsb@vitro.com (Steve Brailsford) (02/28/91)
In <1991Feb27.200859.22746@casbah.acns.nwu.edu> matt@eecs.nwu.edu (Matt Larson) writes: >In article <1991Feb19.215942.23527@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes: >|> Recenews and friends are intended for transmitting news via mail from one >|> news system to another, not for gatewaying mail messages into news. There >|> is a popular illusion that gatewaying ought to be trivial; it's not. We >|> do not provide a canned solution for it at this time. >We recently upgraded from B news to C news and we missed this B news >feature right away: we have several mailing lists have an alias that >invokes ``recnews'' to post an article to the corresponding local >group. This is the sort of thing I was looking for when I originally asked this question. I have never used B news, but will look into the source from the archive. What I do is mail news to people who don't have News software and I want to give them a header template to fill in and mail some alias to post it. I tried piping something like that to inews -h but it didn't work. Recenews uses the b7encoding and I don't get mail from them that way. I hope we can come up with something here. -- Steve Brailsford (fsb@vitro.com) _____ Usenet: uupsi!vitro!fsb \/itro Corporation Compu$erve: 73427,1466 14000 Georgia Ave. Voice: (301) 231-1481 Silver Spring, MD 20906
nealpo@b1.ism.isc.com (Neal Pollack) (03/01/91)
> >This is the sort of thing I was looking for when I originally asked this >question. I have never used B news, but will look into the source from >the archive. What I do is mail news to people who don't have News >software and I want to give them a header template to fill in and mail >some alias to post it. I tried piping something like that to inews -h >but it didn't work. Recenews uses the b7encoding and I don't get mail >from them that way. I hope we can come up with something here. >-- > Steve Brailsford (fsb@vitro.com) _____ > Usenet: uupsi!vitro!fsb \/itro Corporation There is the following shell script that works fine for taking a mail note from a mail alias, and posting it to a newsgroup. I do not remember if we had to "adjust" inews for any reason. You may want to adjust this script to your own needs. #!/bin/sh # call this ~/newsbin/input/recvnews or whatever # usenet newsgroup1 ... newsgroupn # # sendmail-compatible usenet transport agent. # Jean-Francois Lamy (lamy@ai.toronto.edu), 89-06-02 # based on code by Rayan Zachariassen. # # The arguments are the newsgroups to which the article should be posted. A # complete message, including To:, From: and From_ line expected on stdin. # This assumes of course that the necessary magic has been done so that # the mailer recognizes newsgroup name and decides to use the usenet transport # agent on them. # # Notes: # # - this script should ultimately result in the invocation of a real # "inews" that deals with moderated newsgroups and invokes relaynews. # This version calls nntp, which results in calling a real inews on # the news server. # # - The news program invoked by this script should trust From: lines # (otherwise workstation name hiding, full-name id generation and # all other smarts done by the mailer will be lost) # # - newsgroup "postnews" is ignored, and is used so one can mail # to a postnews alias a message with a Newsgroups: header, with # postnews aliased to postnews@usenet, where usenet is a fake host # handled by this transport agent. # # - Normally a From_ line of site!user and a From: line of user@site # should be produced. If your sendmail cannot be coerced into rewriting # envelope and headers differently you will need to kludge it here. # # # ZMailer notes: # # - The default router.cf does the appropriate things, provided that # scheduler.cf contains: # usenet/* 1m 10 0 0 root daemon sm -c $channel usenet # sm.cf contains: # usenet m /local/lib/mail/bin/usenet usenet $u # (adjust this to reflect the actual location of the installed copy of # this script, of course) # hosts.transport contains a line with: # usenet usenet! # and that the aliases file contains aliases of the form # gradnews: gradnews@usenet # for all newsgroup names that don't have embedded "."). LOGNAME=usenet USER=usenet NAME="YourSite Usenet Mailgate" export LOGNAME USER NAME # make sure this does not end up calling this script again! inews=/usr/local/lib/newsbin/inject/inews orgflag=1 org="`cat /usr/lib/news/organi?ation`" [ "$org" ] || orgflag=1 # do not print empty Organization: header from=/tmp/from$$ for i in $@ do groups="${groups+$groups,}$i" done awk "BEGIN { subject = 0; body = 0; skipping = 0 ; newsgroups = 0; distribution = 0; organization = $orgflag; } body == 1 { print; next } /^$|^[ ][ \\t]*$/ { if (!body) { np = split(path,parts,\"!\"); if (!organization && np == 1) print \"Organization: $org\"; if (!newsgroups) print \"Newsgroups: $groups\"; if (!subject) print \"Subject: (none)\"; } print; body = 1; next } /^To:|^X-To:|^Cc:|^Apparently-To:/ { skipping=1 ; next } /^Received:/ { skipping = 1; next } /^Newsgroups:/ { newsgroups = 1; skipping = 0; printf(\"%s\",\$0); if (\"$groups\" != \"\" && \"$groups\" != \"postnews\") printf(\",%s\\n\",\"$groups\"); else printf(\"\\n\"); next } /^Organi[sz]ation:/ { organization = 1; skipping = 0; print; next } /^Distribution:/ { distribution = 1; skipping = 0; print; next } /^Subject:/ { subject = 1; skipping = 0; print; next } /^From:/ { print \$2 > from ; path = \$2 ; skipping = 0; print; next } /^From |^Return-Path:/ { print \$2 > from ; path = \$2 ; skipping = 1; next } /^[ ]/ { if (skipping) next } /^[A-Za-z-]*:[ \\t]*$/ { if (!body) next } { print } " from="$from" - >/tmp/usenet.$$-1 if [ ! -s $from ]; then echo "nobody@nowhere.no.domain" > $from fi (echo "Path: `sed 1q $from`" ; cat /tmp/usenet.$$-1 ) > /tmp/usenet.$$-2 $inews -W < /tmp/usenet.$$-2 2>>/tmp/errs rm $from /tmp/usenet.$$-* exit 0