Mail-to-Usenet by Matthew Ghio 29-Oct-1994

Here is my version of mail-to-usenet.  It allows posting to usenet by either
sending mail to mail2news@your.site with a Newsgroups: header, or by sending
mail to each group name.  In the latter case, if crossposting is done, the
program is run multiple times; the first message is crossposted
appropriately, and the duplicates are silently dropped by the news server.
Unfortunately, there isn't currently any support for returning errors to
the sender.

First you will need to alias mail2news to pipe into the mail-to-usenet
script.  I have mine in |/usr/lib/news/mail2news/mail-to-usenet
Compile the mail2news.headers.c program.  This is what converts all the
headers.  I named my binary m2nh.

BTW: inews won't work if you don't have "nobody" in your passwd file, if it
is run as uid 32767.

I put the following in my Smail directors file.  You'll probably have to do
something slightly different if you run sendmail.  My .forward.mail2news
file contains "|/usr/lib/news/mail2news/mail-to-usenet"

mail2news:
        driver=forwardfile,
        owner=news;
        prefix="alt.",
        file=/usr/lib/news/.forward.mail2news;
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="comp.",
        file=/usr/lib/news/.forward.mail2news;
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="misc.",
        file=/usr/lib/news/.forward.mail2news,
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="news.",
        file=/usr/lib/news/.forward.mail2news,
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="rec.",   
        file=/usr/lib/news/.forward.mail2news,
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="sci.", 
        file=/usr/lib/news/.forward.mail2news,
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="soc.",
        file=/usr/lib/news/.forward.mail2news,
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="talk.",
        file=/usr/lib/news/.forward.mail2news,
mail2news:
        driver=forwardfile,
        owner=news;
        prefix="myriad.",                       # put your local groups here
        file=/usr/lib/news/.forward.mail2news,
