CCL Home Page
Up Directory CCL 0519.html
Majordomo Archive: Re: majordomo list <--> newsgroup

Re: majordomo list <--> newsgroup

Elizabeth Lear (
Mon, 07 Aug 1995 12:51:47 -0400

>From: "Franklin R. Jones" <>
> e.g. anything posted to the list appears in the news group and
>anything posted to the newsgroup is reflected to the majordomo list
>without dup'ing back to the newsgroup.

Here's what I do for this. This is a repeat of my posting here on 1
June 95.


To explain how this is set up, I'll use my gateway of as an example. I offer a straight bounce
list and a digest version of the newsgroup to email subscribers. All
messages to the newsgroup are automatically sent to the mailing list.
In order to keep things from looping, submissions to the list aren't
sent to the list, they are posted to the newsgroup and then find their
way to the list.

The /etc/aliases entry:

musicals: "|/usr/local/lib/majordomo/wrapper resend -l musicals -h musicals-outgoing"
musicals-outgoing: :include: /usr/local/lib/majordomo/Lists/musicals, "|/usr/local/lib/majordomo/wrapper digest -r -C -l musicals-digest musicals-digest-outgoing"
owner-musicals: eliz
musicals-request: "|/usr/local/lib/majordomo/wrapper majordomo -l musicals"
musicals-approval: eliz
musicals-digest: musicals-post
musicals-digest-outgoing: :include:/usr/local/lib/majordomo/Lists/musicals-digest musicals-digest-request: "|/usr/local/lib/majordomo/wrapper majordomo -l musicals-digest"
musicals-digest-approval: eliz
owner-musicals-digest: eliz
owner-musicals-digest-request: eliz
"|/usr/local/lib/news/mail2news world"

The /usr/lib/news/sys entry:,!local,!wstd::/bin/mail

The config file sets the list to use '' as
the Reply-To address so replies go to the newsgroup.

The program "news2mail":


# Gateway a local news group back to a mailing list
# Written by Spike (
# add " local-mail-alias" to /usr/lib/news/moderators
# add then add something like to /etc/aliases:
# local-mail-alias:
# "|/usr/local/lib/news/news2mail list-address@somehost"

$list = shift;

if ($list eq "-") {
open(MAIL,"|/bin/cat -u");
} else {
open(MAIL,"|/usr/lib/sendmail $list");

while (<>) {

next if (/^From /);
last unless (/^[^ \t]*:/ || (/^[ \t]/ && $. > 1));
if (/^Newsgroups: /i || /^Distribution: /i || /Apparently-To: /i
|| /^Received: /i) {
$killed_last = 1;
next if (/^\s+/ && $killed_last);
$killed_last = 0;
print MAIL $_;

print MAIL "To: $list\n";

print MAIL "\n" if /\S+$/;

print MAIL $_;

while (<>) { print MAIL $_ ; }


I also have another setup that gateways a primary mailing list to a
newsgroup for easier reading. The newsgroup is marked as moderated,
and the moderator's address is given as the post-to-the-list address
for the mailing list. This makes it work in reverse of the musicals
list above - the musicals list gets its postings from the group, and
messages from the members are sent to the newsgroup and then back to
the list. The reverse gets all the newsgroup postings from the
mailing list only, and any postings to the newsgroup are sent to the
list and posted from there to the newsgroup as if the moderator had
approved them. In order to do this, the newsgroup posting address
( must be subscribed to the mailing

The /etc/aliases entry (wstd is my local newsgroup hierarchy):

foobarlist-dist: wstd-mail-foobarlist
"|/usr/local/lib/news/mail2news wstd.mail.foobarlist wstd"
"|/usr/local/lib/news/news2mail foobarlist"

The active file entry:

wstd.mail.foobarlist 0000003259 02963 m

And the program "mail2news":


# Gateway a mailing list to a local news group.
# Written by Spike (
# invoked for /etc/aliases with a alias like
# mailing-list-rdist:
# "|/usr/local/lib/news/mail2news distribution"

$group = shift;
$dist = shift;
if ($group eq "-") {
open(INEWS,"|/bin/cat -u");
} else {
open(INEWS,"|/bin/inews -h");

while (<>) {

next if (/^From /);
last unless (/^[^ \t]*:/ || (/^[ \t]/ && $. > 1));
if (/^To: /i || /^Cc: /i || /^Received: /i || /Apparently-To: /i
|| /^Return-Path: /) {
$killed_last = 1;
next if (/^\s+/ && $killed_last);
$killed_last = 0;
print INEWS $_;

print INEWS "Newsgroups: $group\n";
print INEWS "Distribution: $dist\n";
print INEWS "Approved:\n";

print INEWS "\n" if /\S+$/;

print INEWS $_;

while (<>) { print INEWS $_ ; }


Modified: Wed Dec 23 18:09:00 1998 GMT
Page accessed 8178 times since Sat Apr 17 21:24:49 1999 GMT