Article View: news.software.nntp
Article #80686Re: autocreate groups when someone posts to a nonexisting group?
From: Jon Bendtsen
Date: Thu, 23 Apr 2009 09:27
Date: Thu, 23 Apr 2009 09:27
35 lines
2715 bytes
2715 bytes
Julien ΓLIE wrote: > Hi Jon, > >> The subversion script is in python, so i would have to extend it >> with running an external command. But python also has exceptions, >> which should allow me to only run the external command if the 1. >> attempt to post returned with a 441, no valid group. > > You could also do it before trying to post. > Just send "GROUP news.group.name" and see whether you receive 411 > (no such newsgroup). > > In case you receive 411, you could send what is called a "newgroup > control article" (see control.ctl and controlchan for more information > about how to deal with control articles). It will create the newsgroup > on your server within a few seconds. Just send "GROUP news.group.name" > until you obtain a 211 answer (with of course a timeout, in case > something went wrong). Yes, but since i started down this path, i have been thinking. What do i do if i get an error message which is not "no such group" ? At the moment all my scripts does is throw up to the comitter. I have started hooking into the mailer.py script from subversion so i can run an external program if there is an error. At the very least this program can log the error message so the user wont see something they dont understand and cant fix anyway. I plan to use this script to just create a group if it is missing, and this will also avoid growing a huge group list if someone makes a typo when posting news. Thanks for all your input.
Technical Details
Message-ID:
<gspcaj$8ug$1@munin.diku.dk>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!border1.nntp.ams.giganews.com!nntp.giganews.com!uio.no!hist.no!news.net.uni-c.dk!munin.diku.dk!not-for-mailReferences:
<gsn31b$37q$1@munin.diku.dk> <gsn4bh$3ad$1@munin.diku.dk> <gsn747$tr8$1@puck.litech.org> <gsn8m9$3ks$1@munin.diku.dk> <gsno1h$8u8$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <gspcaj$8ug$1@munin.diku.dk> Subject: Re: autocreate groups when someone posts to a nonexisting group? Date: Thu, 23 Apr 2009 11:27:47 +0200 From: Jon Bendtsen <noone@example.com> References: <gsn31b$37q$1@munin.diku.dk> <gsn4bh$3ad$1@munin.diku.dk> <gsn747$tr8$1@puck.litech.org> <gsn8m9$3ks$1@munin.diku.dk> <gsno1h$8u8$1@news.trigofacile.com> 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!border1.nntp.ams.giganews.com!nntp.giganews.com!uio.no!hist.no!news.net.uni-c.dk!munin.diku.dk!not-for-mail Newsgroups: news.software.nntp Organization: Department of Computer Science, University of Copenhagen Lines: 35 NNTP-Posting-Host: tyr.diku.dk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: munin.diku.dk 1240478867 9168 130.225.96.226 (23 Apr 2009 09:27:47 GMT) X-Complaints-To: news@diku.dk NNTP-Posting-Date: Thu, 23 Apr 2009 09:27:47 +0000 (UTC) User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) In-Reply-To: <gsno1h$8u8$1@news.trigofacile.com>