FAQ News2Mail and Mail2News Gateway
I'm trying to setup a Mail2News gateway and I can't get the new2mail and
mailpost scripts -- which are part of the inn distribution -- to work.
I have setup new2mail as a newsfeed as described, but unfortunately it
sends out every article posted in every newsgroup. Clearly
I don't want that. How do I configure inn to only send out articles posted
to newsgroups which are handled by news2mail?
You should have the following in your config files:
# ^^ the exclamation mark is absolutely important, because
without it everything will be send out to all feeds,
# also to the mailing lists (again:
#^^^ this entry only once
#the following entry only once per newsgroup, which should be send out via news2mail
#^^sender email addresse for outgoing mails
^ ^^the newsgroup
| this is the filter key; every articel which has
| this key in his Path: header will not be mailed;
| all news articles that will enter via mailpost
| will have this key in the Path: header -> no loop!
#one entry per newsgroup:
#^^ sender address
^^ recipient addresse
# it is important that the first field of both files is identical
We also altered the news2mail script to change some headers:
The sender will be altered to the one specified in news2mail.cf and
the original sender (user) will be changed into a Reply-To: header.
Some news headers will be preceeded with a X- to not disturb other
Also the mailpost script was altered:
It now changes the message ID of the mail that will be send back to the
mailing list. For this reason. all articles that are locally generated
(posted via a news client) will appear twice in the newsgroup:
once as the original news posting and once more as the posting returning
from the mailing list. We did this to monitor whether the mail really made
it to the mailing list and back.
Here are to diffs against news2mail and mailpost. As these where done with INN 2.2.1
(I think) you may have to tweak it a little bit (should be obvious - it's perl ;-)
mailpost.diff and news2mail.diff
The arriving mails are piped through formail to get rid of disturbing headers:
| "/usr/bin/formail -f -c -z -U Content-Transfer-Encoding: -I X-Trace: -I X-Complaints-To: | /usr/lib/news/bin/mailpost internal.list.linux.kernel"