Thread View: news.software.nntp
2 messages
2 total messages
Started by Geoff Gibbs
Tue, 16 Mar 1999 00:00
news2mail - header bug + fix
Author: Geoff Gibbs
Date: Tue, 16 Mar 1999 00:00
Date: Tue, 16 Mar 1999 00:00
67 lines
2936 bytes
2936 bytes
news2mail has a bug whereby a cross-posted article produces a To:
field with the addresses space delimited. When this goes through
the mail system the addresses get concatenated. What is required
is that the addresses should be comma delimited for the To: field.
I believe that the following patch fixes the problem :-
% diff -c news2mail.orig news2mail
*** news2mail.orig Wed Feb 17 09:58:52 1999
--- news2mail Tue Mar 16 10:57:14 1999
***************
*** 73,90 ****
($token, $lnames) = split /\s+/, $_, 2;
! $addrs = "";
$cnt = 0;
for $ln ( split /\s+/, $lnames ) {
if ( $maddr{ $ln } ) {
$cnt++;
}
- $addrs = join ' ', $addrs, $maddr{ $ln };
}
if ($cnt > 0) {
! mailto($token, $lnames, $addrs);
}
else {
syslog('notice', 'unknown listname %s', $_);
--- 73,99 ----
($token, $lnames) = split /\s+/, $_, 2;
! $addrs = ""; # for a space separated list for sendmail args
! $laddrs = ""; # for a comma separated list for the To field
$cnt = 0;
for $ln ( split /\s+/, $lnames ) {
if ( $maddr{ $ln } ) {
$cnt++;
+ if ($cnt > 1) {
+ $laddrs = join ', ', $laddrs, $ln;
+ $addrs = join ' ', $addrs, $maddr{ $ln };
+ }
+ else {
+ $laddrs = $ln;
+ $addrs = $maddr{ $ln };
+ }
}
}
if ($cnt > 0) {
! ## mailto($token, $lnames, $addrs);
! mailto($token, $laddrs, $addrs);
}
else {
syslog('notice', 'unknown listname %s', $_);
--
Geoff Gibbs
--
UK-Human Genome Mapping Project-Resource Centre,
Hinxton, Cambridge, CB10 1SB, UK
Tel: +44 1223 494530 Fax: +44 1223 494512 E-mail: G.Gibbs@hgmp.mrc.ac.uk
news2mail gateway from inn-2.2 (ISC)
Author: Dan Larson
Date: Fri, 19 Mar 1999 00:00
Date: Fri, 19 Mar 1999 00:00
65 lines
2840 bytes
2840 bytes
I just installed inn-2.2 from isc.org. The news server is working well, as is
the mail to news gateway (mailpost). I'm having a problem with the
news to mail gateway (news2mail). news2mail is working only up to
a point.
I believe I've set up news2mail.cf and newsfeeds as the inn-2.2
documentation suggests.
news2mail works as it should if I have just one "n2m newsgroup"
defined in newsfeeds and news2mail.cf.
The problem appears if I define more than one n2m newsgroup:
then, any message posted to a n2m newsgroup gets mailed to
all the n2m newsgroups defined in newsfeeds and news2mail.cf.
For example a posting to the nci.test newsgroup results in mail being
sent to the email aliases (test & footest) mapped to the nci.test AND
nci.foo newsgroups. Adding even more n2m newsgroups results in
mail being sent to all the n2m aliases associated with the newsgroups.
Here are some snips from /usr/local/news/etc/newsfeeds:
#news-software@localhost.our.domain.com:rec.pets.redants.*:Tm:n2m!
n2m!:!*:Tc,Ac,Wn*:/usr/local/news/bin/news2mail
test@localhost.nc.com:nci.test.*:Tm:n2m!
footest@localhost.nc.com:nci.foo.test.*:Tm:n2m!
#engr@localhost.nc.com:nci.foo.bar.*:Tm:n2m!
#lego@localhost.nc.com:nci.foo.baz.*:Tm:n2m!
And from /usr/local/news/etc/news2mail.cf:
#news-software@localhost.our.domain.com
test@localhost.nc.com test@nc.com
footest@localhost.nc.com footest@nc.com
#foobar@localhost.nc.com foobar@nc.com
#foobaz@localhost.nc.com foobaz@nc.com
These above snips are from files on the news server "news.nc.com" .
I have the following aliases set up:
smtp server (global) aliases:
test: test@news.nc.com
footest@news.nc.com
news.nc.com (local) aliases:
test: "|/usr/local/news/bin/mailpost nci.test"
footest: "|/usr/local/news/bin/mailpost nci.foo.test"
Any idea what's causing messages posted to a n2m newsgroup to
go to all the n2m email aliases? Is this a configuration problem, a
documentation problem, or a bug?
Any help or pointers are greatly appreciated.
Dan Larson
Network Computer Inc.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads