Article View: news.software.nntp
Article #84155Re: Mail-to-News
From: Dennis Davis
Date: Thu, 30 Jun 2011 15:18
Date: Thu, 30 Jun 2011 15:18
205 lines
8322 bytes
8322 bytes
In the referenced article, dont.bother writes:
...
>I'm not sure I understand the principles behind the whole
>operation. Here's what I believe must happen (please make all the
>corrections you find in my flawed assumptions):
>
>E-mail from a mailing list comes in to my domain MTA (SIMS on a
>PowerMac).
>
>I must route (forward) it to the INN server (a different computer
>than the domain MTA).
That's right. The INN machine then recognises these re-routed
addresses as "special" and delivers them to the appropriate Newsgroup.
>The INN server is running Exim4 version 4.69-9+lenny4.
I'm not at all familar with the Debian installation of exim. I
believe the Debian exim configuation file is somewhat fragmented.
Enough that there's a separate mailing list for exim issues on
Debian. However at the level we're talking it doesn't matter.
> From what I've read, the INN server box needs an entry in
>/etc/aliases and I have entered:
>
>larryslist: "| /usr/lib/news/bin/mailpost -b /var/tmp
>ARRL.Div.Midwest.KS.LarrysList"
I do things slightly differently, but that's certainly appropriate.
>When that failed, I reduced it to:
>
>larryslist: "| /usr/lib/news/bin/mailpost ARRL.Div.Midwest.KS.LarrysList"
No. you probably need the "-b /var/tmp" as the exim processes and
INN processes may be running under different usernames.
>The newsgroup was created and is shown below on yesterday's Daily Usenet
>Report:
>
>Newsgroups created:
>Group Mode
>ARRL.Div.Midwest.KS.LarrysList m
>
>TOTAL 1
>
>
>Today I changed the group mode to "y" for testing, so I wouldn't be
>stumped by a moderator issue.
Use the "-a {address}" argument to mailpost to get round moderator
issues.
>I am guessing the /etc/aliases entry will take anything addressed to
>"larryslist" and pipe it into mailpost, which basically triggers the
>mailpost script into processing the message.
That sounds OK. But you'll need to tweak the exim configuration
to get it to do so. Or so it seems from the error messages you
describe later.
>As mentioned, so far it isn't working. Nothing has been posted to
>that group.
>
>I know very little about Exim4. It is a default MTA installed with
>Sarge, Lenny, Squeeze, ... and has always "just worked" as far as I
>can remember.
You're trying do do something a little out of the ordinary. So the
default configuration might not be up to this. A crash course in
exim might be required :-(
>After further testing, I may have a problem with my main MTA routing.
>Plus DNS issues with testing on the same LAN that contains the main MTA
>and the INN box.
>
>So I tried bypassing those possible problem and sent e-mail to
>"larryslist" using mailx on the INN computer itself. This resulted in
>the following from a tail of /var/log/exim4/mainlog :
>
>2011-06-29 12:33:00 1QbydI-0001Mk-AA <= john@optima11.my.net U=john
>P=local S=456
>2011-06-29 12:33:01 1QbydI-0001Mk-AA == |/usr/lib/news/bin/mailpost
>ARRL.Div.Midwest.KS.LarrysList <larryslist@optima11.my.net>
>R=system_aliases defer (-30): pipe_transport unset in system_aliases router
>
>I put the original /etc/aliases entry back and got the same failure:
>
>2011-06-29 12:45:45 1Qbypd-0001PK-2V <= john@optima11.my.net U=john
>P=local S=420
>2011-06-29 12:45:45 1Qbypd-0001PK-2V == | /usr/lib/news/bin/mailpost -b
>/var/tmp ARRL.Div.Midwest.KS.LarrysList <larryslist@optima11.my.net>
>R=system_aliases defer (-30): pipe_transport unset in system_aliases router
>
>Two terms there that I'm not familiar with, "pipe_transport" and
>"system_aliases router" and I cannot find anything defining them.
>
>Anything you (or anyone) can offer will be greatly appreciated.
See:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch22.html
right close to the top of the page you'll see:
system_aliases:
driver = redirect
data = ${lookup{$local_part}lsearch{/etc/aliases}}
You'll have something like this is your exim configuration file.
This'll be the "system_aliases router" that's interpreting your
alias file.
Later on in the above page you'll see a comment:
An item is treated as a pipe command if it begins with | and
does not parse as a valid RFC 2822 address that includes a
domain. A transport for running the command must be specified by
the pipe_transport option. Normally, either the router or the
transport specifies a user and a group under which to run the
delivery. The default is to use the Exim user and group.
The error message is complaining that you've used | (pipe) in your
aliases file but haven't specified an exim transport to handle these
deliveries. Note that you'll probably want to specify the "news"
user and group to run the delivery.
The default, example configuration file that comes with the source
of exim, eg exim-4.76/src/configure.default is well-commented and
contains good examples of the above. It might be worth you getting a
copy and looking through it. It may well contain the bits you want.
(Apologies if this sounds a bit hazy, I set this up for our Cnews
box a few years ago and the configurations hasn't really changed
other than to move it to the INN box.)
However before doing any of the above, check that your INN setup
will allow you to post articles in the manner you require. I'm
still a bit of a newbie with this. The last time I ran INN was in
2004 with INN2.2. And I can't remember any of it :-(
However I needed to tweak my INN installation to let it post
articles to itself. Here's the steps I took, they might be a
useful checklist.
(1) Check that:
server: localhost
is set in inn.conf. The default is to have it unset. Without this
set, inews won't know how to post articles.
(2) Make sure the example entry:
#DHD#peer ME {
#DHD# hostname: "localhost, 127.0.0.1, ::1"
#DHD#}
is commented out similar to what I've done. With this entry present,
the local host can only transit articles, not post them.
(3) Ensure you have the identity:
# This assigns the identity of <localhost> to the local machine.
auth "localhost" {
key: "localhost"
hosts: "localhost, 127.0.0.1, ::1, stdin"
default: "<localhost>"
}
and auth:
# "localhost" has access to read and post to any Newsgroup and post
# articles with Approved: headers to moderated Newsgroups.
access "localhost" {
key: "localhost"
users: "<localhost>"
newsgroups: "*"
access: RPA
}
set in readers.conf. This sets up the loopback address with
permission to post articles.
You'll probably need to "ctlinnd xexec innd" to get the above to
take effect. Then you can use "inews -h" to test posting articles
in the manner that mailpost requires.
(I've tried using mailpost on Solaris and I get a failure:
can't lock /var/tmp/mailpost-msgid.lock: Bad file number
on the second article posted. The first one creates the above file
& article database. I suspect this is because mailpost uses the
flock perl command and this isn't working as expected on Solaris.
If so this should be easy to fix, just tweak the perl to use
something like the perl module LockFile-Simple-0.207. Should be
good enough. It's just finding time to do this.)
--
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@bath.ac.uk
Technical Details
Message-ID:
<LnLzu6.6IE.B.larch@bath.ac.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin3!goblin.stu.neva.ru!bolzen.all.de!fu-berlin.de!bath.ac.uk!ccsdhdReferences:
<iuaorh$gbt$1@n102.xanadu-bbs.net> <LnK0v2.13B.B.larch@bath.ac.uk> <iufpeq$qgh$1@n102.xanadu-bbs.net>Show Full Headers
Complete Article Headers
Message-ID: <LnLzu6.6IE.B.larch@bath.ac.uk> Subject: Re: Mail-to-News Date: Thu, 30 Jun 2011 15:18:06 GMT From: ccsdhd@bath.ac.uk (Dennis Davis) References: <iuaorh$gbt$1@n102.xanadu-bbs.net> <LnK0v2.13B.B.larch@bath.ac.uk> <iufpeq$qgh$1@n102.xanadu-bbs.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin3!goblin.stu.neva.ru!bolzen.all.de!fu-berlin.de!bath.ac.uk!ccsdhd Newsgroups: news.software.nntp Organization: University of Bath Computing Services, UK Lines: 204