webmin-inn/0040755000000000000000000000000007711506462011633 5ustar rootrootwebmin-inn/help/0040755000000000000000000000000007714707001012556 5ustar rootrootwebmin-inn/help/help.inn.html0100644000000000000000000000224607714707001015160 0ustar rootroot# Last Changed: $Date: 2003/08/08 11:48:16 $ $Revision: 1.5 $ #
Handelsregister Berlin auslesen

Dieses Modul umfasst die folgenden Mglichkeiten

0. If you have problems with installation or configuration of the INN, please visit the Website of its owner: http://www.isc.org/

...

1. We recommend reviewing the source of this module to ensure there are no security risks. Use of this module is on your own risk.

2. digiSec GbR is not responsible for any errors or omissions.

3. digiSec GbR expressly disclaims responsibility for, and makes no endorsement or warranty.

4. How do i send an error :


©2003 by digiSec GbR

Mehr Information unter : http://digisec.mine.nu/webmin-inn/lang/0040755000000000000000000000000007674631242012557 5ustar rootrootwebmin-inn/lang/de0100644000000000000000000000450307674631241013070 0ustar rootrootcommand_restart=Hier klicken, damit der INND Server neu gestartet wird. Das aktiviert die aktuelle Konfiguration. command_restart_value=Dienst neu starten command_start=Start INND Server command_startmsg=Hier klicken, damit der INND Server startet und die aktuelle Konfiguration einliest. index=InterNetNews Server Startseite index_inn=Zurck zur INN Menseite index_version=INN-Version index_webmin=Zurck zur Menseite index_title=InterNetNews Server Kontrollseite status_ok=Luft status_notok=Luft Nicht mail2news_title=InterNetNews Server (Mail2News) mail2news_aliases_ecannot=Sie haben keine Berechtigung, Aliases zu bearbeiten. mail2news_aliases_addr=Adresse mail2news_aliases_to=Alias auf.. mail2news_aliases_type1=Adresse $1 mail2news_aliases_type2=Adressen in Datei $1 mail2news_aliases_type3=Datei $1 mail2news_aliases_type4=Programm $1 mail2news_aliases_type5=Automatische Antwortdatei $1 mail2news_aliases_none=Keine mail2news_aliases_return=Alias-Liste mail2news_description=Die Emailadresse bitte fr lokale bzw. fr Netzinterne Zwecke anpassend an dem lokalen Sendmail eingeben. Die passende Newsgroup wird nach den klassischen Vorgaben eingerichtet (a.b.c.d). aform_type=Mail2News aform_edit=Alias bearbeiten aform_create=Alias erstellen aform_name=EMail-Adresse aform_enabled=Aktiviert? aform_val=verweist auf Newsgruppe access_auth_title=Authentifizierungsbeschrnkung access_auth_name=Name access_auth_type=Type access_auth_match=Inhalt access_auth_noacls=Keine Authentifizierung access_access_title=Zugriffsbeschrnkung access_access_name=Name access_access_type=Type access_access_match=Inhalt access_access_noacls=Keine Zugriffsbeschrnkung inn_conf_edit_title=inn.conf editieren inn_conf_edit_field=Feld inn_conf_edit_value=inhalt inn_conf_edit_edit=aendern general_no_exist=Keine Standardoptionen gefunden expire_title=Haltezeiten festlegen expire_description=Haltezeiten von Artikeln setzen expire_class=Klasse expire_wildmat=Wildcard expire_keep=Haltezeit expire_default=Voreinstellung expire_purge=Purge expire_remember=Artikel behalten expire_remember_long=Wieviele Tage expire_grouptype=Gruppentyp restart_cannot=Nicht erlaubt um den INND zu starten restart_sig=Fehler beim Starten $1 : $2 restart_running=INND scheint nicht zu laufen start_cannot=Nicht erlaubt um den INND zu starten start_error=Fehler beim Starten des INND : $1 webmin-inn/lang/en0100644000000000000000000000471107674631241013103 0ustar rootrootcommand_restart=Click this button to restart the running INND server. This will cause the current configuration to become active command_restart_value=Apply Changes command_start=Start INND Server command_startmsg=Click this button to start the INND server, and load the current configuration index=InterNetNews Server top-page index_inn=Back to Main INN Page index_version=INN-Version index_webmin=Return to mainpage index_title=InterNetNews Server controlling locally status_ok=Running status_notok=Not Running mail2news_title=InterNetNews Server (Mail2News) mail2news_aliases_addr=Address mail2news_aliases_to=Alias to.. mail2news_aliases_none=No Aliases found mail2news_aliases_type1=Address $1 mail2news_aliases_type2=Addresses in file $1 mail2news_aliases_type3=File $1 mail2news_aliases_type4=Program $1 mail2news_aliases_type5=Autoreply file $1 mail2news_aliases_type6=Apply filter file $1 mail2news_aliases_return=alias list mail2news_aliases_toomany=There are too many mail aliases on your system to display on this page. mail2news_aliases_go=Find aliases matching: mail2news_description=Please insert an EMail address for local uses or local uses by sendmail or refer to your administration. The Newsgroup will inserted in classic style (a.b.c.d) . Please refer to your dependencies. aform_ecannot=You are not allowed to edit this alias aform_type=Mail2News aform_edit=Edit Alias aform_create=Create Alias aform_name=Email-Address aform_enabled=Enabled? aform_val=aliased to Newsgroup aform_afile=Edit.. aform_return=alias access_auth_title=Authentication realms access_auth_name=Realm access_auth_type=Type access_auth_match=match access_auth_noacls=No Authenticationcontrol access_access_title=Access realms access_access_name=Realm access_access_type=Type access_access_match=match access_access_noacls=No Accesscontrol inn_conf_edit_title=inn.conf editing inn_conf_edit_field=field inn_conf_edit_value=value inn_conf_edit_edit=edit general_no_exist=Sorry no general options found expire_title=Expire expire_description=expiration of articles expire_class=class expire_wildmat=wildmatching expire_keep=keep expire_default=default expire_purge=purge expire_remember=Remember all articles expire_remember_long=how many days expire_grouptype=grouptype restart_cannot=You are not allowed to restart INND restart_sig=Failed to signal process $1 : $2 restart_running=INND does not appear to be running start_cannot=You are not allowed to start INND start_error=Failed to start INND : $1 webmin-inn/inn-lib.pl0100644000000000000000000000203607611523712013512 0ustar rootroot# inn-lib.pl # Functions for controling the total INN # newgroup # inn_rmgroup # renumber # SUB NEWGROUP # sub inn_newgroup { my $INN_INSTALL_PATH; my $NEWER = $_[0]; my $type = $_[1]; if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } &system_logged("$INN_INSTALL_PATH/bin/ctlinnd newgroup $NEWER $type"); open(LOGDATEI, "> /tmp/Statut"); print LOGDATEI "$NEWER - $type - $INN_INSTALL_PATH"; close LOGDATEI; } # SUB NEWGROUP # sub inn_rmgroup { my $INN_INSTALL_PATH; my $name = $_[0]; if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } &system_logged("$INN_INSTALL_PATH/bin/ctlinnd rmgroup $name "); } # SUB NEWGROUP # sub inn_renumber { my $INN_INSTALL_PATH; my $name = $_[0]; if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } &system_logged("$INN_INSTALL_PATH/bin/ctlinnd renumber $name "); } webmin-inn/save_alias.cgi0100644000000000000000000000116707611523712014424 0ustar rootroot#!/usr/bin/perl do '../web-lib.pl'; &init_config(); do 'inn-lib.pl'; use CGI qw(:standard); my $val_0=param("val_0"); my $type_0=param("type_0"); my $enabled=param("enabled"); my $new=param("new"); my $name=param("name"); if ( $config{'inn_config_path'} ) { $PATH=$config{'inn_config_path'}; } else { $PATH="/etc/news"; } &inn_newgroup( $val_0, "m"); $val_0 = "$config{'mail2news'}/$config{'mail2news_prog'} ".$val_0; open(LOGDATEI, ">> $PATH/moderators"); print LOGDATEI "$name:$name\n"; close(LOGDATEI); redirect("/sendmail/save_alias.cgi\?val_0=$val_0\&type_0=$type_0\&enabled=$enabled\&new=$new\&name=$name"); ## ENDwebmin-inn/config-suse-linux-7.30100644000000000000000000000020407666632563015446 0ustar rootrootmail2news=/usr/local/bin mail2news_prog=mail2news inn_install_path=/usr/lib/news inn_config_path=/etc/news start_cmd=/etc/init.d/innwebmin-inn/config-suse-linux-8.00100644000000000000000000000020407666632563015444 0ustar rootrootmail2news=/usr/local/bin mail2news_prog=mail2news inn_install_path=/usr/lib/news inn_config_path=/etc/news start_cmd=/etc/init.d/innwebmin-inn/config-debian-linux-3.00100644000000000000000000000020507666632563015703 0ustar rootrootmail2news=/usr/local/bin mail2news_prog=mail2news inn_install_path=/usr/lib/news inn_config_path=/etc/news start_cmd=/etc/init.d/inn2webmin-inn/restart.cgi0100644000000000000000000000053307575617231014006 0ustar rootroot#!/usr/bin/perl # restart.cgi # Restart the running innd do '../web-lib.pl'; &ReadParse(); #%access = &get_module_acl(); #$access{'ro'} && &error($text{'restart_cannot'}); #$access{'apply'} || &error($text{'restart_cannot'}); &kill_logged('HUP', $in{'pid'}) || &error(&text('restart_sig', $in{'pid'}, $!)); &webmin_log("apply"); &redirect(""); webmin-inn/images/0040755000000000000000000000000007674631242013103 5ustar rootrootwebmin-inn/images/icon.gif0100644000000000000000000000446307627141753014527 0ustar rootrootGIF89a00,& B9hddf̈TV lf\XXB`Vh0$8|{f|ņD>@YMKtuDvs4.L&dlh||{|LķԎjZXX}l|2l|Jtڨti|zrqj`W܈ZY"FAYvtN94P(DB :4TL-DD>dljgjd^<:TLJ<:4lnPyv~l^ɪƴޗJ]B "ԁgˤ Q }ՓDfYh(WCagg&V08UD3HUXȺ¾V\ڶQ2 pB)%  ,?8А {TG*аE6M#s;UD2Kzp+Ā OV8 ֡)`w-tt D  apXW1A4`t+#@,d@. bJRRxE-R -LsSt!Q!&q[C/ ^@j "d4n)0DŽ]ȥdaNP'zPܨ!"@J1‹>_!=N*&|jm?:oze172E7&$č&A"AH $(pQBaP s!L^O*CCHȘB.@A$I@07!X5QB:',Pad2AFQ'D=2 i3 8 `PDj^!tN8=3p $m, QlHk_tȐU 3R#F:y b(F[ aL= t] cH#58A|p aψQA9'xs!CXbO<H'=y0h -k0 !@"h!(H@a 0S؁ ;XǮ@>b npCActp 3B@,@9P% b8$RXxAA8P .G8x, ^xC(0{DpBq / p!@!Ē O0VK@t$ CaցL@~x zQ Ka<@ S@%D)c 1H4\rNr0X@F:<\D.3!><Op#Q XRdF i[y)yL6DM :cBF? ?W #2M#>ށfoQƒ"ϰs 5KH, BL(dp?v4B>аE2M"5hXRR =E05XbJ" IL hB)oB,QTͰ9Tp>ET2G*ˌK[_ ykC WlšQwN?Kc7Swf+MfцQ! @.PGz)7U}!/>Lm/>S_X5|ǏT$#_X{ B@я~_W-Ђ__?&ĉ7VP OAC w)@=h@11#X .K_W\(-+ԂE%GTD2hLOR;webmin-inn/images/general.jpg0100644000000000000000000000170407652010414015205 0ustar rootrootJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222**-!1"AQ$2#BRaq ?ߚo.,b!q'$V`pH{c ]M CW<Č*)!bz#G[5HCB5/#NO)ߥn&fc 7"uI>Ibǿ΂жnVޤ6[\лBv 9F8у~) l QIjUK:E6%=6\ ;4@NI\nGCu dDz#GV.*~@ lY U@cou YG(>GZxYU +p\1$ƂĴlظ/++%\c폙Ɓ@h+ ' ;-FtHbϞ8C@0ܮp4|K) |⃂f,:2cg7|.}(_\~ֆ'zJ׮+aÂ?eI>_]Yd00F^kz}h+O}cQJ਱%q5[5Ʀ 粡KfYigXV.1@yaHd%CF-M$W\FJkRC+0!ZQȭ0W?zЂ@A0Ga"[/cC+o p3a0Q}H.L*|ZȀjp lC4l"DTEҍ|%KfĐ?Y?dSȁ8v|,dD2^G 34:mY=E05XbJ" JL hB)oB,QTͰձ|]`λ:8#K+Jҗ;q_hXB}FwS(Yt ]sa.ˀFOXLB. cҰ=3 Băڡ_;webmin-inn/readme.txt0100644000000000000000000000330307711506462013625 0ustar rootrootINN control Tool actual Version 0.0.0b ------------------------------------------- Dieses ist ein Werkzeug fr Administratoren zur Verwaltung des lokalen INN A Toolkit to administrate the InterNetNews (INN) by www-isc.org The Package : It includes innd, an NNTP server, and nnrpd, a newsreading server. ------------------------------------------- Bugs : - of cause a lot - expire editing - Todos : - a lot of Stuff Info : - After new compiling of INN-2.3.x and it won't come up try that: news@mars:/usr/local/news/db> mv history.n.dir history.dir news@mars:/usr/local/news/db> mv history.n.hash history.hash news@mars:/usr/local/news/db> mv history.n.index history.index - Problems with storage.conf: insert at the end like that to the ./etc/storage.conf file method tradspool { class: 1 newsgroups: * } <...snip> And of cause read the ./doc/INSTALL Controlling INN Webmin Module ------------------------------------------ Change Log : 0.0.0b1 - (24.Apri 2003) - inserting an possibility to change the inn.conf 0.0.0b - (26.Mrz 2003) - Implementing the Expire.ctl listing - Displays SERVER-STATUS if throttled - Editing the AUTH in the reades.conf 0.0.0a - (10.January 2003) - Button for expire stats - Listed the User-Permissions, but not edited - inserting mail2news - original script by 0.0.0 - (Projekt gestartet am 30.September.2002): firsttime Readme.txt installed. ------------------------------------------- copyright 2003 by digiSec.de Verfasser : M.Blohm mailto : matthias.blohm@digisec.de Special Thanks to : digiSec GbR ------------------------------------------- MailtoNews owned by Bek Oberin http://www.tertius.net.au/~gossamer/code/ webmin-inn/mail2news.cgi0100644000000000000000000001305607666632563014235 0ustar rootroot#!/usr/bin/perl # # Controlling INN Webmin Module # Copyright (C) 2003 by Matthias Blohm # ######################################### do '../web-lib.pl'; do '../sendmail/aliases-lib.pl'; $|=1; &init_config(); %access=&get_module_acl(); my @ERG =(); my $path = $ENV{'PATH'}; do 'parser-lib.pl'; my $HOST = get_system_hostname(); ## Look for useful files if ( ! -e "$config{'mail2news'}/$config{'mail2news_prog'}" ) { my ($CMMC) = "cp mail2news.pl $config{'mail2news'}/$config{'mail2news_prog'} ; chmod +x $config{'mail2news'}/$config{'mail2news_prog'}"; my $msg = `$CMMC 2>&1`; } # Try to get the version number my $out = `$config{'inn_install_path'}/bin/innconfval` ; my ( $dumm1, $innd_version) = split (/INN/,$out ); &header($text{'mail2news_title'}." mail2news.pl script by Bek Oberin","images/icon.gif", "help.webman", 1, 1,0, "Written by Author :Matthias Blohm Home of v.$VERSION://digisec.mine.nu/webmin/", undef,undef, &text('index_version')."$innd_version" ); print "
\n"; print "$text{'mail2news_description'} "; print "
\n"; #if ( $msg ) { print "
error: ".$msg."
/$config{'mail2news'}/$config{'mail2news_prog'}"; &sendmail_alias_form(); ####################################### ## mail2news aliases auflisten ####################################### print "
\n"; # Aliases auslesen my @config_aliases = ( '/etc/aliases' ); my @aliases = &list_sendmail_aliases(@config_aliases); # render tables print "
\n"; if (@aliases) { &aliases_table(@aliases); } print "\n"; print "
\n"; ####################################### ## STATUS abfragen ####################################### #print "

Ende :


"; # } ####################################### &footer("/webmin-inn", $text{'index_inn'}); # uses the index entry in /lang/en ####################################### ### END of index.cgi ###. sub aliases_table { print "\n"; print " ", "\n"; foreach $a (@_) { ($anum, $astr) = &alias_type(@{$a->{'values'}}); $_ = $astr; if ( $anum == 4 && $astr =~ /mail2news/ ) { # print "$anum - $astr
\n"; print "\n"; print "\n"; print "\n"; }} print "
$text{'mail2news_aliases_addr'}$text{'mail2news_aliases_to'}
{'num'}\">", $a->{'enabled'} ? "" : "",&html_escape($a->{'name'}), $a->{'enabled'} ? "" : "","\n"; foreach $v (@{$a->{'values'}}) { ($anum, $astr) = &alias_type($v); print &text("mail2news_aliases_type$anum", "".&html_escape($astr).""),"
\n"; } if (!@{$a->{'values'}}) { print "$text{'mail2news_aliases_none'}\n"; } print "
\n"; } # sendmail_alias_form([alias]) # Display a form for editing or creating an alias. Each alias can map to # 1 or more programs, files, lists or users sub sendmail_alias_form { local(@values, $v, $type, $val, @typenames); #print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'aform_edit'}
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
",&hlink("$text{'aform_name'}","alias_name"),"
",&hlink("$text{'aform_enabled'}", "alias_enabled")," $text{'yes'}\n "; print " $text{'no'}
", &hlink("$text{'aform_val'}","alias_to"),"\n"; print "\n"; print "\n"; print "
\n"; print "\n"; print "
\n"; } # list_aliases(files) # Returns an array of data structures, each containing information about # one sendmail alias sub list_sendmail_aliases { local($lnum, @rv, $file, $lalias); local @skip = split(/\s+/, $config{'alias_skip'}); foreach $file ($_[0]) { $lnum = 0; open(AFILE, $file); while() { s/\r|\n//g; # remove newlines if (/^(#*)\s*([^:$ \t]+)\s*:\s*(.*)$/) { local(%alias, @values, $v); $alias{'eline'} = $alias{'line'} = $lnum; $alias{'file'} = $file; $alias{'enabled'} = $1 ? 0 : 1; $alias{'name'} = $2; $v = $alias{'value'} = $3; while($v =~ /^\s*,?\s*()"([^"]+)"(.*)$/ || $v =~ /^\s*,?\s*(\|)"([^"]+)"(.*)$/ || $v =~ /^\s*,?\s*()([^,\s]+)(.*)$/) { push(@values, $1.$2); $v = $3; } $alias{'values'} = \@values; $alias{'num'} = scalar(@rv); if (&indexof($alias{'name'}, @skip) < 0) { push(@rv, \%alias); $lalias = \%alias; } } elsif (/^(#*)\s+(\S.*)$/ && $lalias && ($1 && !$lalias->{'enabled'} || !$1 && $lalias->{'enabled'})) { # continuation of last alias $lalias->{'eline'} = $lnum; local $v = $2; $lalias->{'value'} .= $v; while($v =~ /^\s*,?\s*()"([^"]+)"(.*)$/ || $v =~ /^\s*,?\s*(\|)"([^"]+)"(.*)$/ || $v =~ /^\s*,?\s*()([^,\s]+)(.*)$/) { push(@{$lalias->{'values'}}, $1.$2); $v = $3; } } else { $lalias = undef; } $lnum++; } close(AFILE); } return @rv; }webmin-inn/general_conf.cgi0100644000000000000000000000611507676533305014747 0ustar rootroot#!/usr/bin/perl # ## $Id: general_conf.cgi,v 1.8 2003/06/26 09:03:00 maja Exp $ # # Controlling INN Webmin Module # Copyright (C) 2003 by Matthias Blohm # ######################################### do '../web-lib.pl'; $|=1; &init_config(); do 'parser-lib.pl'; use CGI qw(:standard :html3); use CGI::Carp qw(fatalsToBrowser carpout); %access=&get_module_acl(); my $EDITIEREN = param("EDITIEREN"); my $AENDERN = param("AENDERN"); my @ERG =(); my $FILE=$config{'inn_config_path'}."/"."inn.conf"; my $HOST = get_system_hostname(); ## Check VAR ! if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } # replace_file_line(file, line, [newline]*) if ( $AENDERN == 81549 ) { my $OLD_LINE=param("OLD_LINE"); my $OLD_TYPE=param("OLD_TYPE"); my $X_LINE=" ".$OLD_TYPE.": \"".param("X_LINE")."\""."\n"; my $RETU = &replace_file_line_dp($FILE, $OLD_LINE, "$X_LINE"); &redirect('/webmin-inn/general_conf.cgi'); } # Try to get the version number my $out = `$INN_INSTALL_PATH/bin/innconfval` ; my ( $dumm1, $innd_version) = split (/INN/,$out ); &header($text{'index_title'},"images/icon.gif", "help.inn", 1, 1,0, "Written by Author :Matthias Blohm Home of v.$VERSION://digisec.mine.nu/webmin/", undef,undef, &text('index_version')."$innd_version" ); print < EOT local(%auth); # Get the Config-File &read_env_file_dp($FILE,\%auth); #print "anz: $#auth
File:$FILE
"; # @access = &get_config("readers.conf","access"); #print "anz: $#access
"; if (%auth) { # List all defined access control directives print "

$text{'inn_conf_edit_title'}

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; my $COCO=1; my $CCC=0; my $LASTVALUE=''; foreach $a (%auth) { $CCC++; if ( $EDITIEREN == $COCO and $CCC == 2 ) { print "\n"; $CCC=0; $COCO++; } else { print "\n"; if ( $CCC >= 2 ) { print "\n"; $CCC=0; $COCO++; } else { $LASTVALUE=$a; } } } print "
$text{'inn_conf_edit_field'}$text{'inn_conf_edit_value'}$text{'inn_conf_edit_edit'}
"; print ""; print ""; print ""; print ""; print "
$aedit
\n"; } else { print "$text{'general_no_exist'}
\n"; } print "
\n"; # } ####################################### &footer("/webmin-inn", $text{'index_inn'}); # uses the index entry in /lang/en ####################################### ### END of index.cgi ###. webmin-inn/index.cgi0100644000000000000000000001345407676533305013440 0ustar rootroot#!/usr/bin/perl # # Controlling INN Webmin Module # Copyright (C) 2003 by Matthias Blohm # # Last Changed: $Date: 2003/06/26 09:03:00 $ $Revision: 1.18 $ ######################################### do '../web-lib.pl'; &init_config(); %access=&get_module_acl(); do 'parser-lib.pl'; my @ERG =(); my $VERSION="0.0.0b2-cvs"; my $HOST = get_system_hostname(); ## Check VAR ! if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } # Try to get the version number my $out = `$INN_INSTALL_PATH/bin/innconfval` ; my ( $dumm1, $innd_version) = split (/INN/,$out ); &header($text{'index_title'},"images/icon.gif", "help.inn", 1, 1,0, "Written by Author :Matthias Blohm Home of v.$VERSION://digisec.mine.nu/webmin/", undef,undef, &text('index_version')."$innd_version" ); print <

Global Options

general settings
User Permissions
Expire
Mail2News


EOT print "
"; ####################################### ## Newsgroups auflisten ####################################### @ERG = `$INN_INSTALL_PATH/bin/getlist -h localhost` ; #print "XXX:$#ERG"; if ( $#ERG < 1 ) { print ""; print " "; print " "; print " "; @STATUS = `$INN_INSTALL_PATH/bin/innstat`; print " "; print " "; } else { print "
Server Status
@STATUS[1]
"; print " "; print " "; print " "; print " "; print " "; print " "; foreach $EEE (@ERG) { print " "; (my $E1, my $E2, my $E3, my $E4 ) = split (/ /,$EEE); print " "; print " "; print " "; print " "; print " "; } } print "
NewsgroupStartEndactive/moderated
$E1$E2$E3$E4

"; print "

\n"; ## Formular print ""; print ""; print ""; print ""; print ""; print " "; print "
Newsgroup:
"; print "
"; print " "; print "
= newgroup type : "; print "

"; ####################################### ## Newsfeeds auflisten ####################################### print "
\n"; ####################################### ## STATUS abfragen ####################################### print "

System Checking :

"; ## INN testen print"InterNetNews-Server(INN):
"; print "..checking : "; my $resultat = `ps auxww | egrep "innd" | grep -v grep` ; my ( $dumm2, $piddi) = split (/\s+/, $resultat ); if (($resultat)) { print "$text{'status_ok'} on pid ($piddi)
"; } else { print "$text{'status_notok'}
" ; } print "
"; #if (!$access{'ro'} && $access{'apply'}) { if ($piddi && kill(0, $piddi)) { # innd is running print "
"; print ""; print ""; print "
\n"; print ""; print " $text{'command_restart'}

"; } else { # innd is not running print "
\n"; print "
\n"; print "
\n"; print "\n"; print " $text{'command_startmsg'}
\n"; print "
\n"; } # } ####################################### &footer("/", $text{'index_webmin'}); # uses the index entry in /lang/en ####################################### ### END of index.cgi ###. webmin-inn/config.info0100644000000000000000000000070207607347113013751 0ustar rootrootline1=User configuration,11 run_as=Running as user,0 line2=System configuration,11 inn_install_path=Path of the INN installation,3,/usr/lib/news inn_config_path=Configuration path,3,/etc/news pid_file=Default PID file location,3,/var/run/innd.pid start_cmd=Command to start INND,3,Default line3=Mail2News availibilities,11 mail2news=Where to find the script mail2news.pl,3,/usr/local/bin mail2news_prog=What is the Name of mail2news.pl,3,mail2news webmin-inn/readers_conf.cgi0100644000000000000000000001072407676533305014760 0ustar rootroot#!/usr/bin/perl # ## $Id: readers_conf.cgi,v 1.12 2003/06/26 09:03:00 maja Exp $ # # Controlling INN Webmin Module # Copyright (C) 2003 by Matthias Blohm # ######################################### do '../web-lib.pl'; $|=1; &init_config(); do 'parser-lib.pl'; use CGI qw(:standard :html3); use CGI::Carp qw(fatalsToBrowser carpout); %access=&get_module_acl(); my $EDITIEREN_ACC = param("EDITIEREN_ACC"); my $EDITIEREN_AUT = param("EDITIEREN_AUT"); my $AENDERN = param("AENDERN"); my @ERG =(); my $VERSION="0.0.0b2"; my $HOST = get_system_hostname(); ## Check VAR ! if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } # replace_file_line(file, line, [newline]*) if ( $AENDERN == 42449 ) { my $OLD_LINE=param("OLD_LINE"); my $OLD_TYPE=param("OLD_TYPE"); my $X_LINE=" ".$OLD_TYPE.": \"".param("X_LINE")."\""."\n"; my $FILE=$config{'inn_config_path'}."/"."readers.conf"; my $RETU = &replace_file_line($FILE, $OLD_LINE, "$X_LINE"); &redirect('/webmin-inn/readers_conf.cgi'); } # Try to get the version number my $out = `$INN_INSTALL_PATH/bin/innconfval` ; my ( $dumm1, $innd_version) = split (/INN/,$out ); &header($text{'index_title'},"images/icon.gif", "help.inn", 1, 1,0, "Written by Author :Matthias Blohm Home of v.$VERSION://digisec.mine.nu/webmin/", undef,undef, &text('index_version')."$innd_version" ); print < EOT # Get the Config-File @auth = &get_config("readers.conf","auth"); #print "anz: $#auth
"; @access = &get_config("readers.conf","access"); #print "anz: $#access
"; if (@auth) { # List all defined access control directives print "

$text{'access_auth_title'}

\n"; print "\n"; print "\n"; print "\n"; print "\n"; foreach $a (@auth) { print "\n"; print "\n"; print "\n"; print "\n"; if (( $a->{'value'} ) and ( ! $EDITIEREN_AUT )) { print "\n"; } else { if ( $EDITIEREN_AUT == $a->{'line'} ) { print ""; } else { print "\n"; } } print "\n"; } print "
$text{'access_auth_name'}$text{'access_auth_type'}$text{'access_auth_match'} edit
$a->{'name'}$a->{'type'}'$a->{'value'}'{'line'}\">edit
"; print ""; print "{'type'}\">"; print "{'line'}\">"; print "{'value'}\">"; print "
\n"; } else { print "$text{'access_auth_noacls'}
\n"; } if (@access) { # List all defined access control directives print "

$text{'access_access_title'}

\n"; print "\n"; print "\n"; print "\n"; print "\n"; foreach $a (@access) { print "\n"; print "\n"; print "\n"; print "\n"; if (( $a->{'value'} ) and ( ! $EDITIEREN_ACC )) { print "\n"; } else { if ( $EDITIEREN_ACC == $a->{'line'} ) { print ""; } else { print "\n"; } print "\n"; } } print "
$text{'access_access_name'}$text{'access_access_type'}$text{'access_access_match'} edit
$a->{'name'}$a->{'type'}'$a->{'value'}'{'line'}\">edit
"; print ""; print "{'type'}\">"; print "{'line'}\">"; print "{'value'}\">"; print "
\n"; } else { print "$text{'access_access_noacls'}
\n"; } print "
\n"; # } ####################################### &footer("/webmin-inn", $text{'index_inn'}); # uses the index entry in /lang/en ####################################### ### END of index.cgi ###. webmin-inn/module.info0100644000000000000000000000014207546072106013766 0ustar rootrootcategory=others desc=INN Control-Tool desc_de=Inn Control Tool name=inn depends=0.99 version=0.99 webmin-inn/start.cgi0100644000000000000000000000126007627141663013454 0ustar rootroot#!/usr/bin/perl # start.cgi # Start innd # su news -c /path/to/rc.news do '../web-lib.pl'; &init_config(); my $user=""; my $START_CMD; ## Check VAR ! if ( $config{'start_cmd'} ) { $START_CMD=$config{'start_cmd'}; } else { $START_CMD="/etc/init.d/inn"; } #%access = &get_module_acl(); #$access{'ro'} && &error($text{'start_ecannot'}); #$access{'apply'} || &error($text{'start_ecannot'}); if ($config{'run_as'}) { $user = "$config{'run_as'}"; } else { $user = "root"; } # &error("
su $user -c $START_CMD start 
"); $out = &backquote_logged("su $user -c \"$START_CMD start\" >/dev/null 2>&1"); if ($out) { &error("
$out
"); } &webmin_log("start"); &redirect(""); webmin-inn/config-suse-linux0100644000000000000000000000020407666632563015141 0ustar rootrootmail2news=/usr/local/bin mail2news_prog=mail2news inn_install_path=/usr/lib/news inn_config_path=/etc/news start_cmd=/etc/init.d/innwebmin-inn/parser-lib.pl0100644000000000000000000001063507676533305014240 0ustar rootroot# parser-lib.pl # Functions for reading and writing the inn config file ## $Id: parser-lib.pl,v 1.12 2003/06/26 09:03:00 maja Exp $ my $VERSION="0.0.0b2-cvs"; # replace_file_line(file, line, [newline]*) # Replaces one line in some file with 0 or more new lines sub replace_file_line_dp { local(@lines); open(FILE, $_[0]); @lines = ; close(FILE); if (@_ > 2) { splice(@lines, $_[1], 1, @_[2..$#_]); } else { splice(@lines, $_[1], 1); } open(FILE, "> $_[0]"); print FILE @lines; close(FILE); } # read_env_file(file, &array) sub read_env_file_dp { open(FILE, $_[0]) || return 0; while() { s/#.*$//g; if (/([A-z0-9_\.]+)\s*:\s*"(.*)"/ || /([A-z0-9_\.]+)\s*:\s*'(.*)'/ || /([A-z0-9_\.]+)\s*:\s*(.*)/) { $_[1]->{$1} = $2; } } close(FILE); return 1; } # get_config() # Parses inn.conf into an array of data structures sub get_config { local($lnum, $_); my $FILE=$config{'inn_config_path'}."/".$_[0]; my $BEGINNER=0; $SEARCH=$_[1]; my @get_config_cache; open(CONF, $FILE); $lnum = 0; while() { s/\r|\n//g; # strip newlines and comments s/#.*$//g; if (/^\s*(\S+)\s*(.*)$/) { if (( /^$SEARCH/ ) or ( $BEGINNER == 1 )) { # print $_."
"; if ( /^$SEARCH/ ) { $BEGINNER=1; } if ( /}/ ) { $BEGINNER=0; } local(%dir); if ( /\{/ ) { my ( $TEIL1, $TEIL2, $TEIL3 ) =split (/}/, $_ ); $TEIL1 =~ s/$SEARCH//g; $TEIL1 =~ s/\"//g; $TEIL1 =~ s/ //g; $TEIL1 =~ s/({)|(})//g; $dir{'name'} = $TEIL1; $dir{'line'} = $lnum; push(@get_config_cache, \%dir); } else { my ( $TEIL1, $TEIL2, $TEIL3 ) =split (/:/, $_ ); $TEIL2 =~ s/\"//g; $TEIL1 =~ s/}//g; $dir{'name'} = ''; $dir{'value'} = $TEIL2; $dir{'type'} = $TEIL1; $dir{'line'} = $lnum; push(@get_config_cache, \%dir); } } } $lnum++; } close(CONF); return @get_config_cache; } # find_config(name, &config) # Returns the structure(s) with some name sub find_config { local($c, @rv); foreach $c (@{$_[1]}) { if ($c->{'name'} eq $_[0]) { push(@rv, $c); } } return @rv ? wantarray ? @rv : $rv[0] : wantarray ? () : undef; } # find_value(name, &config) # Returns the value of some directive sub find_value { local $rv = &find_config(@_); return $rv ? $rv->{'value'} : undef; } # find_values(name, &config) # Returns the value of some directive sub find_values { local $rv = &find_config(@_); return $rv ? $rv->{'values'} : undef; } # save_value(&config, name, value*) sub save_value { local @v = map { { 'name' => $_[1], 'values' => [ $_ ] } } @_[2..@_-1]; &save_directive($_[0], $_[1], \@v); } # save_directive(&config, name, &values) # Given a structure containing a directive name, type, values and members # add, update or remove that directive in config structure and data files. sub save_directive { local(@oldv, @newv, $i, $o, $n, $lref, $nl, $change); @oldv = &find_config($_[1], $_[0]); @newv = map { local %n = %$_; \%n } @{$_[2]}; $lref = &read_file_lines($config{'squid_conf'}); for($i=0; $i<@oldv || $i<@newv; $i++) { if ($i >= @oldv) { # a new directive is being added.. put it at the end of the file $nl = &directive_line($newv[$i]); if ($change) { # put it after any directives of the same type $newv[$i]->{'line'} = $change->{'line'}+1; splice(@$lref, $newv[$i]->{'line'}, 0, $nl); &renumber($_[0], $change->{'line'}, 1); splice(@{$_[0]}, &indexof($change, @{$_[0]}), 0, $newv[$i]); $change = $newv[$i]; } else { # put it at the end of the file $newv[$i]->{'line'} = scalar(@$lref); push(@$lref, $nl); push(@{$_[0]}, $newv[$i]); } } elsif ($i >= @newv) { # a directive was deleted splice(@$lref, $oldv[$i]->{'line'}, 1); &renumber($_[0], $oldv[$i]->{'line'}, -1); splice(@{$_[0]}, &indexof($oldv[$i], @{$_[0]}), 1); } else { # updating some directive $nl = &directive_line($newv[$i]); splice(@$lref, $oldv[$i]->{'line'}, 1, $nl); $newv[$i]->{'line'} = $oldv[$i]->{'line'}; $_[0]->[&indexof($oldv[$i], @{$_[0]})] = $newv[$i]; $change = $newv[$i]; } } } # directive_line(&details) sub directive_line { local(@v) = @{$_[0]->{'values'}}; return $_[0]->{'name'}.(@v ? " ".join(' ',@v) : ""); } # renumber(&directives, line, count) # Runs through the given array of directives and increases the line numbers # of all those greater than some line by the given count sub renumber { local($d); foreach $d (@{$_[0]}) { if ($d->{'line'} > $_[1]) { $d->{'line'} += $_[2]; } } } 1; webmin-inn/mail2news.pl0100644000000000000000000001027507607347113014073 0ustar rootroot#!/usr/bin/perl -w # # mail2news # From the mail2news mini-HOWTO and extensively adapted by # Bek Oberin # # Below corections by Joop Boonen # # Added correct handeling of To and Cc # also added multiline reading of To and Cc # and corrected X-$to to $to # # Last updated by jboonen on Sun Feb 25 21:39:18 CET 2001 # use strict; use vars qw($inews $iopts $postinghost $nntphost $approved $organization $VERSION); # # User Config # # Where's your posting program? $inews = "/usr/bin/inews"; $iopts = "-h"; #$inews = "/usr/bin/rnews"; #$iopts = "-v"; # for debugging - output to screen #$inews = "cat"; #$iopts = ""; $nntphost = "localhost"; $postinghost = "localhost"; #$postinghost = "tertius.net.au"; # Approved: line. Can be anything, really. $approved = "yes"; $organization = "none"; # # Constants # $VERSION = "1.3"; # # Parse args # my $newsgroup; if ($#ARGV < 0) { # $newsgroup = "test"; # we'll expect the newsgroup line in the body } elsif ($#ARGV == 0) { $newsgroup = $ARGV[0]; } else { die "usage: mail2news [newsgroup]\n"; } # # Sig handler # # in case inews dumps core or something crazy $SIG{'PIPE'} = "plumber"; sub plumber { die "mail2news: \"$inews\" died prematurely!\n"; } # # Make sure inews can find the server # $ENV{"NNTPSERVER"} = $nntphost; # # Main starts here # $approved ||= "yes"; # just make sure it's -something- $organization ||= "mail2news gateway"; open (INEWS, "| $inews $iopts") || die "mail2news: can't run $inews\n"; my $to; my $cc; my $saw_approved = 0; my $saw_organization = 0; my $saw_subject = 0; my $saw_msgid = 0; my $saw_path = 0; my $saw_newsgroup = 0; my $saw_references = 0; my $in_reply = 0; # header munging loop while () { last if /^$/; # transform real from: line back to icky style s/^From:\s+(.*) <(.*)>/From: $2 ($1)/; s/^Message-Id/Message-ID/i; # check if "To:" is in the line in this case put it in $to if ($_=~/^To: /) { $to=$_; # check if there are more than one address via last character , # if yes than read next line and add it to $to while ($_=~/\,$/) { chomp ($_=); $to="$to"."$_\n"; } } # check if "cc:" (ignore case) is in the line in this case put it in $cc if ($_=~/^Cc: /i) { $cc=$_; # check if there are more than one address via last character , # if yes than read next line and add it to $cc while ($_=~/\,$/) { chomp ($_=); $cc="$cc"."$_\n"; } } $in_reply = $_ if /^In-Reply-To: /; # transform from_ line to path header if (!$saw_path && (s/^From\s+(\S+)@(\S+).*/Path: $2!$1/ || s/^From\s+(\S+)[^@]*$/Path: $1\n/)) { $saw_path ||= ($1 eq 'Path'); } next if /^Message-ID/ && $saw_msgid; next if /^Path/ && $saw_path; next if /^Newsgroups/ && $newsgroup; # argv newsgroup overrides next if /^Message-ID:.*@.*@/; # invalid message-id, we don't want it print INEWS if /^(Date|From|Subject|Path|Newsgroups|Message-ID|Approved|Organization|Content-Type|MIME-Version|References):/i; if (defined($1)) { $saw_references ||= ($1 eq 'References'); $saw_path ||= ($1 eq 'Path'); $saw_subject ||= ($1 eq 'Subject'); $saw_msgid ||= ($1 eq 'Message-ID'); $saw_newsgroup ||= ($1 eq 'Newsgroups'); $saw_approved ||= ($1 eq 'Approved'); $saw_organization ||= ($1 eq 'Organization'); } } die "mail2news: didn't get newsgroup from either headers or ARGV\n" unless $newsgroup || $saw_newsgroup; my ($sec,$min,$hour,$mday,$mon,$year) = localtime(time); my $madeupid = "\<$year$mon$mday.$hour$min$sec.$$\@$postinghost\>"; print INEWS "Newsgroups: $newsgroup\n" if $newsgroup && !$saw_newsgroup; print INEWS "Subject: unknown\n" unless $saw_subject; print INEWS "Message-ID: $madeupid\n" unless $saw_msgid; print INEWS "Approved: $approved\n" unless $saw_approved; print INEWS "Organisation: $organization\n" unless $saw_organization; print INEWS "$to" if $to; print INEWS "$cc" if $cc; if (!$saw_references && $in_reply) { $in_reply =~ m/(<[^@>]+@[^>]+>)/; print INEWS "References: $1\n" if $1; } print INEWS "\n"; print INEWS while ; # gobble rest of message close INEWS; exit $?; # # End. # webmin-inn/expire.cgi0100644000000000000000000001173607637574136013632 0ustar rootroot#!/usr/bin/perl # # Controlling INN Webmin Module # Copyright (C) 2003 by Matthias Blohm # # Last Changed: $Date: 2003/03/24 12:21:50 $ $Revision: 1.11 $ ######################################### do '../web-lib.pl'; $|=1; &init_config(); my $VERSION="0.0.0b"; my $NEWS_DAILY=''; ## Check VAR ! if ( $config{'inn_install_path'} ) { $INN_INSTALL_PATH=$config{'inn_install_path'}; } else { $INN_INSTALL_PATH="/usr/lib/news"; } # Try to get the version number my $out = `$INN_INSTALL_PATH/bin/innconfval` ; my ( $dumm1, $innd_version) = split (/INN/,$out ); &header($text{'index_title'},"images/icon.gif", "help.inn", 1, 1,0, "Written by Author :Matthias Blohm Home of v.$VERSION://digisec.mine.nu/webmin/", undef,undef, &text('index_version')."$innd_version" ); print "
\n"; print "$text{'expire_description'} "; print "
\n"; ####################################### # Reading the Crontab ##### if ( ! $config{'run_as'} ) { $CRONUSER="news"; } else { $CRONUSER=$config{'run_as'}; } my @ERG = `crontab -l -u root` ; foreach $CRONNI ( @ERG ) { if ( $CRONNI =~ /^no/ ) { $NEWS_DAILY="noCrontab for user $CRONUSER"; } if ( $CRONNI =~ /news.daily/ ) { $NEWS_DAILY="news.daily existiert in der crontab von $CRONUSER
$CRONNI"; } } ##### print "
press to: $NEWS_DAILY
"; ## Ein Button mit der Mglichkeit es einzutragen. ## Expire-Now button ####################################### ## mail2news aliases auflisten ####################################### print "
\n"; # expires auslesen my $config_expires = '/etc/news/expire.ctl'; my $expires = &read_file_lines($config_expires); ## class specified in storage.conf ## wildmat-style patterns for the newsgroups ## Mininum number of days to keep article ## Default number of days to keep the article ## Flush article after this many days # render tables print "remember artcles\n"; print "
\n"; print "\n"; print "\n"; print "\n"; for($i=0; $i<@$expires; $i++) { my ($class, $wildmat, $keep, $default, $purge) = split(/:/,$expires->[$i]); if ( $class =~ /^\/remember\// ) { print "\n"; print "\n"; print "\n"; } } print "
$text{'expire_remember'}$text{'expire_remember_long'}
$class$wildmat
"; print "
group matching\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; # M Only moderated groups # U Only unmoderated groups # A All groups # X Removes the article from all groups that it appears in for($i=0; $i<@$expires; $i++) { my ($class, $wildmat, $keep, $default, $purge) = split(/:/,$expires->[$i]); if ( $class =~ /(^#)|(^\/remember\/)/ ) { print " "; } else { if ( $purge ) { if ($wildmat eq "M" ) { $wildmat="M - Only moderated groups";} if ($wildmat eq "U" ) { $wildmat="U - Only unmoderated groups"; } if ($wildmat eq "A" ) { $wildmat="A - All groups"; } if ($wildmat eq "X" ) { $wildmat="X - Removes the article from all groups that it appears in"; } print "\n"; print "\n"; print "\n"; } } } print "
$text{'expire_wildmat'}$text{'expire_grouptype'}$text{'expire_keep'}$text{'expire_default'}$text{'expire_purge'}
$class$wildmat$keep$default$purge
\n"; print "
based on storage class\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; for($i=0; $i<@$expires; $i++) { my ($class, $wildmat, $keep, $default, $purge) = split(/:/,$expires->[$i]); if ( $class =~ /(^#)|(^\/remember\/)/ ) { print " "; } else { if ( $class =~ /^[0-9]/ ) { print "\n"; print "\n"; print "\n"; } } } print "
$text{'expire_class'}$text{'expire_wildmat'}$text{'expire_keep'}$text{'expire_default'}
$class$wildmat$keep$default
\n"; print "
\n"; print "
\n"; ####################################### ## STATUS abfragen ####################################### #print "

Ende :


"; # } ####################################### &footer("/webmin-inn", $text{'index_inn'}); # uses the index entry in /lang/en ####################################### ### END of index.cgi ###. webmin-inn/newstakesaction.cgi0100644000000000000000000000121207611523712015506 0ustar rootroot#!/usr/bin/perl do '../web-lib.pl'; &init_config(); do 'inn-lib.pl'; &ReadParse(); #$val_0 = "$config{'mail2news'}/$config{'mail2news_prog'} ".$val_0; #&newgroup( $name, "m");# (my $DUM , my $ACTION)=split(/=/,$in[1]); ($DUM, my $NEWSGROUP )=split(/=/,$in[0]); ($DUM, my $TYPE )=split(/=/,$in[2]); ($DUM, my $NEWTYPE )=split(/=/,$in[3]); if ( $ACTION eq "a3" && $TYPE ) { &inn_newgroup($TYPE, $NEWTYPE); } if ( $ACTION eq "a2" ) { &inn_rmgroup($NEWSGROUP); } if ( $ACTION eq "a1" ) { &inn_renumber($NEWSGROUP); } open(LOGDATEI, "> /tmp/Status"); print LOGDATEI "$ACTION - $NEWSGROUP - $TYPE - $NEWTYPE"; close LOGDATEI; &redirect("index.cgi");