[Mailman-Developers] [ mailman-Bugs-579285 ] gate_news attempts connect to bad hosts

noreply@sourceforge.net noreply@sourceforge.net
Wed, 24 Jul 2002 10:05:37 -0700


Bugs item #579285, was opened at 2002-07-09 15:16
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=579285&group_id=103

Category: nntp/news
Group: 2.0.x
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Steve Fox (drfickle)
Assigned to: Nobody/Anonymous (nobody)
Summary: gate_news attempts connect to bad hosts

Initial Comment:
I've been having gate_news spew out 'Connection
refused' errors every five minutes for quite some time
now. I finally tracked down what the problem is, and
hopefully someone more skilled in Python than I can
create a simple fix.

In the open_news function it doesn't check whether the
mlist.nntp_host variable is valid or not (in my case it
was a null string). A simple if check would solve the
problem here, but I think that's addressing the
symptom, not the problem.

Rather I think the real problem is that the MailList
class sets gateway_to_mail to "true" (I'm not sure what
the real value is), even if the nntp host name is
invalid. Then the process_lists function assumes that
nntp_host is valid and calls open_newsgroup on it.

I would suggest that if the nntp_host is invalid, that
the MailList class not set gateway_to_mail to be "true".

Thanks!

----------------------------------------------------------------------

>Comment By: Steve Fox (drfickle)
Date: 2002-07-24 12:05

Message:
Logged In: YES 
user_id=17512

That sounds great. Thanks.

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-07-24 10:45

Message:
Logged In: YES 
user_id=12800

While I won't fix this for MM2.0, in MM2.1, you now cannot
enable gatewaying unless both the nntp_host and
linked_newsgroup fields are filled in.  It's too expensive
and annoying to do further validation (i.e. that the given
host exists and accepts nntp connections, and that the
newsgroup is a valid newsgroup on the host).

----------------------------------------------------------------------

Comment By: Steve Fox (drfickle)
Date: 2002-07-09 15:32

Message:
Logged In: YES 
user_id=17512

I forgot to mention that gateway_to_mail seems to be set
"true" anytime the mail-to-news page contains any
non-default values. That is, even if hostname and newsgroup
are blank, but one or more of the radio buttons are set to
yes, gate_to_mail will be "true".

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=579285&group_id=103