[news.software.b] Sys file question

datpete@daimi.aau.dk (Peter Andersen) (02/01/91)

In C-news, is it possible to specify that my own site (ME) wants to receive
an entire news hierarchy (e.g. 'comp'), *except* a particular group (e.g. 
comp.special.group), that I only want to appear in our local database if it 
has distribution 'local' ?

I have tried something like

	ME:comp,!comp.special.group/all::
	ME:comp.special.group/local::

but everything posted locally to comp.special.group seems to go into the local
database, regardless of the distribution.

The reason for this question: I try to gateway a mailing list into a local 
newsgroup (comp.special.group).
When mails come from the mailing list, a small script posts these as articles
to comp.special.group with distribution 'local'.
When a local user posts an article to comp.special.group with distribution
'local', I want the article to go into the local database, and nowhere else.
When a local user posts an article to comp.special.group with a distribution
wider than 'local', I mail it into the mailing list. In this case I don't want
the article to go into the local database, since it will later appear in the 
mailing list, and then be gatewayed into the newsgroup by the script mentioned 
above. 
The reason for the sys-file question is thus that I want to prevent that
locally posted articles appear twice in the newsgroup.

I have loooked at the stuff in the 'contrib' directory in the C-news 
distribution, but I haven't found a solution to this part of the problem.

Any hints ?

Peter Andersen

henry@zoo.toronto.edu (Henry Spencer) (02/02/91)

In article <1991Feb1.112306.3072@daimi.aau.dk> datpete@daimi.aau.dk (Peter Andersen) writes:
>In C-news, is it possible to specify that my own site (ME) wants to receive
>an entire news hierarchy (e.g. 'comp'), *except* a particular group (e.g. 
>comp.special.group), that I only want to appear in our local database if it 
>has distribution 'local' ?

No; the distribution subfield of the ME line is ignored, as documented
in news(5).
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry@zoo.toronto.edu   utzoo!henry

matthew@sunpix.east.sun.com (Matthew Stier - Sun Visualization Products) (02/02/91)

In article <1991Feb1.112306.3072@daimi.aau.dk> datpete@daimi.aau.dk (Peter Andersen) writes:
>The reason for the sys-file question is thus that I want to prevent that
>locally posted articles appear twice in the newsgroup.
>
>I have loooked at the stuff in the 'contrib' directory in the C-news 
>distribution, but I haven't found a solution to this part of the problem.
>
>Any hints ?
>
>Peter Andersen

Your looking at the problem from the wrong perspective.  There is a routine in
inews (or what ever passes for Bnews 'inews' program in Cnews) that eliminates
duplicate articles based on Message-ID.  If your can hack your mail-to-news and 
news-to-mail program to not drop this line from the header, your problem is 
solved.

News-to-mail:
	Mail programs ignore unknown header lines.
	Bonus: mail reading person, now has article reference in to reply with.

Mail-to-news:
	Inews receives mail message, finds Message-ID line, determines its a
	duplicate and throws it out.


-- 
Matthew Lee Stier    (mstier@east.Sun.COM)   |
Sun Microsystems ---  RTP, NC  27709-3447    |     "Wisconsin   Escapee"
uucp:  sun!mstier or mcnc!rti!sunpix!matthew |
phone: (919) 469-8300 fax: (919) 460-8355    |

kyle@wendy-fate.uu.net (Kyle Jones) (02/02/91)

datpete@daimi.aau.dk (Peter Andersen) writes:
 > [...] I try to gateway a mailing list into a local 
 > newsgroup (comp.special.group).
 >
 > When mails come from the mailing list, a small script posts these as
 > articles to comp.special.group with distribution 'local'.  When a local
 > user posts an article to comp.special.group with distribution 'local', I
 > want the article to go into the local database, and nowhere else.  When
 > a local user posts an article to comp.special.group with a distribution
 > wider than 'local', I mail it into the mailing list. In this case I
 > don't want the article to go into the local database, since it will
 > later appear in the mailing list, and then be gatewayed into the
 > newsgroup by the script mentioned above.  The reason for the sys-file
 > question is thus that I want to prevent that locally posted articles
 > appear twice in the newsgroup.

If a locally posted article is sent to the mailing list and loops back
with the same message ID, the news system will reject it as a
duplicate.  As long as that's the case, you can let articles with any
distribution be spooled by the news system, since it will keep track
of the message ID and reject the mailing list copy when it returns.
Just make sure the gateway to the mailing list doesn't give messages a
new message ID.

bruce@balilly.UUCP (Bruce Lilly) (02/03/91)

In article <1991Feb1.164242.29384@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
>
>No; the distribution subfield of the ME line is ignored, as documented
>in news(5).

What would happen if one used the system name (``as determined from
/usr/lib/news/whoami'') rather than "ME"?


--
	Bruce Lilly		blilly!balilly!bruce@sonyd1.Broadcast.Sony.COM

henry@zoo.toronto.edu (Henry Spencer) (02/05/91)

In article <1991Feb3.004017.25272@blilly.UUCP> bruce@balilly.UUCP (Bruce Lilly) writes:
>>No; the distribution subfield of the ME line is ignored, as documented
>>in news(5).
>
>What would happen if one used the system name (``as determined from
>/usr/lib/news/whoami'') rather than "ME"?

The same.  ME is just an abbreviation.
-- 
"Maybe we should tell the truth?"      | Henry Spencer at U of Toronto Zoology
"Surely we aren't that desperate yet." |  henry@zoo.toronto.edu   utzoo!henry

rsalz@bbn.com (Rich Salz) (02/05/91)

In <1991Feb1.164242.29384@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
>No; the distribution subfield of the ME line is ignored, as documented
>in news(5).
If I were writing a news transport system, here's what I'd do:
	-Punt all rmgroup/newgroup activity to a user to do manually.
	-Ignore the ME entry in a sys file EXCEPT for the Distributions
	 field.
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.

ambar@ora.com (Jean Marie Diaz) (02/05/91)

   From: rsalz@bbn.com (Rich Salz)
   Date: 4 Feb 91 21:46:52 GMT

   If I were writing a news transport system, here's what I'd do:
           [...]
	   -Ignore the ME entry in a sys file EXCEPT for the Distributions
	    field.

Actually, the fact that the ME: entry *is* consulted when deciding
whether to accept or junk an article has saved us from such
net.avalanches such as the 150 psu.<stuff> newsgroups created by Biff.
Applying the distributions subfield would be useful to people who want
to enforce what distributions they recieve, but there doesn't seem to
be a crying need for it.

				AMBAR

rsalz@bbn.com (Rich Salz) (02/07/91)

I said 
>   If I were writing a news transport system, here's what I'd do:
>           [...]
>	   -Ignore the ME entry in a sys file EXCEPT for the Distributions
>	    field.

Ambar says:
>Actually, the fact that the ME: entry *is* consulted when deciding
>whether to accept or junk an article has saved us from such
>net.avalanches such as the 150 psu.<stuff> newsgroups created by Biff.
I guess I forgot to add that I would force all newgroup/rmgroup operations
to be performed manually... :-)

>Applying the distributions subfield would be useful to people who want
>to enforce what distributions they recieve, but there doesn't seem to
>be a crying need for it.
Yeah, well, I think it would be easy enough to do.

It seems to me that newsgroups are created or destroyed very rarely when compared
to article flow.  If you forced them to be done manually I think it would be quite
reasonable to write a program that depended on hashings of the sys and active files.
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.