Mail<->News Gateways
Felix E. Klee
felix.klee at inka.de
Thu Sep 23 15:39:36 UTC 2004
Hi,
what follows is an update on our experiences with INN's mail<->news
gateway scripts mailpost (mail->news) and news2mail (news->mail). All
in all, the configuration seems to run fine. I put the modified scripts
on my web site [1] together with files necessary for Mailman
configuration.
On Wed, 22 Sep 2004 04:14:36 +0200 Felix E. Klee wrote:
> 3. After a message is forwarded from a NG to a ML via news2mail,
> postnews kicks in and tries to resend it to the NG. The result is an
> email to the news server with a subject such as
>
> inews failed: inews: cannot send article to server: 441 435
> Duplicate: Illegal seek inews: article not posted
>
> Hacking the postnews script to prevent sending emails in such cases
^^^^^^^^
mailpost is it's name
> would solve the problem. But maybe there is a nicer solution?
Here's our current solution:
1. The script news2mail adds a header "X-News2Mail: 1" to the email.
2. If mailpost finds this header, it bails out.
> 4. Crossposts to NGs are not properly handled by news2mail. The problem
> is that a dot is used as a separator in the "To:" field of the
> mails to the mailing lists. An example:
>
> Newsgroups: foo, bar
>
> would get translated into
>
> To: foo at example.org.bar@example.org
>
> This seems to be a definite bug that can probably be fixed quickly by
> someone who speaks Perl. We'll investigate that tomorrow.
I fixed that one by adding the following line to the script news2mail:
$lnames =~ tr/ /,/;
> 5. Postings to a NG should be forwarded to the corresponding ML, no
> matter if the user is subscribed or not. We haven't yet investigated
> this problem at all and, thus, would appreciate any suggestion.
> We're running Mailman to host the lists, BTW.
To solve this problem, we let Mailman approve all messages with the
header "X-News2Mail: 1". Configuring Mailman for this purpose involves
adding a new filter to its global pipeline.
Furthermore we got the following problems solved:
6. Problem: A message that is sent to the ML gets forwarded to the NG
using mailpost. This is what we want. Then, however, the default
news2mail resends the message back to the ML. The result is that all
messages sent to the ML appear twice (Mailman has no check for
duplicate Message-IDs, AFAIK). The solution is to again use a custom
header:
1. mailpost adds a header "X-Mail2News: 1" to each message it posts
to a NG.
2. news2mail bails out if it finds that header.
7. Problem: mailpost reformats the "From:"-header into
always-qualified 974-format ("addr (comment)")
This format, however, is not interpreted nicely by many news readers.
In several news readers (Sylpheed, Slrn, Tin, OE, GNUS), I get the
following somewhat inconsistent behavior.
a) 'From: a.b at c.d ("A B")' is displayed as '"A B"' (i.e. quotation
marks are not stripped).
b) 'From: a.b at c.d (A B)' is displayed as 'A B'.
c) 'From: "A B" <a.b at c.d>' is displayed as 'A B'.
d) 'From: A B <a.b at c.d>' is displayed as 'A B'.
Since mailpost frequently formats messages as in a), I decided to
completely disable the reformatting code.
BTW, the news reader PAN strips the quotation marks in all the above
cases.
Felix
[1] http://sites.inka.de/~W1787/inn/
More information about the inn-workers
mailing list