aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README12
-rw-r--r--README.debian (renamed from debian/README.debian)0
-rw-r--r--changelog.Debian49
-rw-r--r--control (renamed from debian/control)0
-rw-r--r--debian/changelog248
-rw-r--r--debian/compat1
-rw-r--r--debian/copyright10
-rw-r--r--debian/dirs2
-rw-r--r--debian/docs2
-rw-r--r--debian/examples2
-rw-r--r--debian/notused/crontab.ex1
-rw-r--r--debian/notused/diversions.ex1
-rw-r--r--debian/notused/inetd.conf.ex2
-rw-r--r--debian/notused/info.ex15
-rw-r--r--debian/notused/init.d.ex51
-rw-r--r--debian/notused/manpage.1.ex41
-rw-r--r--debian/notused/menu.ex2
-rw-r--r--debian/notused/watch.ex5
-rw-r--r--debian/pygm2n.168
-rw-r--r--debian/pygn2m.179
-rwxr-xr-xdebian/rules81
-rw-r--r--debian/whitelist.575
-rw-r--r--mail2news.py2
-rw-r--r--mail2news.py.withtab319
-rwxr-xr-xpygm2n11
25 files changed, 62 insertions, 1017 deletions
diff --git a/README b/README
index 4eed9d9..2302224 100644
--- a/README
+++ b/README
@@ -1,3 +1,15 @@
+This package was debianized by Cosimo Alfarano <alfarano@students.cs.unibo.it> on Sun, 25 Jun 2000 17:52:35 +0200.
+
+Current maintainer and author is Cosimo Alfarano.
+You can find this package at URL HTTP://www.students.cs.unibo.it/~alfarano
+
+Copyright:
+Copyright (C) 2000-2001,2012 Cosimo Alfarano <kalfa@debian.org>
+
+A copy of the GNU General Public License, version 2, can be found in
+/usr/share/common-licenses/GPL-3
+
+
Pyg is a news to mail and mail to news gateway.
It is under devel.
diff --git a/debian/README.debian b/README.debian
index c9d90ed..c9d90ed 100644
--- a/debian/README.debian
+++ b/README.debian
diff --git a/changelog.Debian b/changelog.Debian
index 458e5aa..f53d92d 100644
--- a/changelog.Debian
+++ b/changelog.Debian
@@ -1,3 +1,52 @@
+pyg (0.9.8ubuntu2) raring; urgency=low
+
+ * Fix build failure with python in multiarch location.
+
+ -- Matthias Klose <doko@ubuntu.com> Mon, 08 Apr 2013 18:40:05 +0200
+
+pyg (0.9.8ubuntu1) raring; urgency=low
+
+ * Merge from Debian unstable. Remaining changes:
+ - adapt /wlp/C/Makefile for multiarched libfl.a
+ - include required string.h in wlp/C/commands.l
+
+ -- Logan Rosen <logatronico@gmail.com> Mon, 26 Nov 2012 17:28:37 -0500
+
+pyg (0.9.8) unstable; urgency=low
+
+ * Added string.h to avoid implicit declarations in yacc definitions.
+ Closes: #689349
+ * Remove some compile-time warning from wlp/C/wlp.c
+ * not ignore errors in clean targets on all Makefile
+ * debian/compat bump to 5 (higher should be tested)
+ * use dh_python2
+
+ -- Cosimo Alfarano <kalfa@debian.org> Tue, 02 Oct 2012 14:04:01 +0100
+
+pyg (0.9.7ubuntu1) quantal; urgency=low
+
+ * adapt /wlp/C/Makefile for multiarched libfl.a
+ * include required string.h in wlp/C/commands.{l,y}
+
+ -- Julian Taylor <jtaylor@ubuntu.com> Mon, 01 Oct 2012 21:10:48 +0200
+
+pyg (0.9.7) unstable; urgency=low
+
+ * Added maildrop as a possible deps (Closes: #385771)
+ * Typos fixed in HOWTO.
+ * Creating md5sum control file
+
+ -- Cosimo Alfarano <kalfa@debian.org> Fri, 18 Jul 2008 13:35:57 -0400
+
+pyg (0.9.6-4.2) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * Add BLDSHARED to Makefile.pre.in for python2.5 compatibility.
+ Closes: #476160
+ * Add shlibs:Depends in debian/control.
+
+ -- Thomas Viehmann <tv@beamnet.de> Sun, 20 Apr 2008 16:49:23 +0200
+
pyg (0.9.6-4.1) unstable; urgency=low
* Non-maintainer upload.
diff --git a/debian/control b/control
index 40c52a5..40c52a5 100644
--- a/debian/control
+++ b/control
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index f53d92d..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,248 +0,0 @@
-pyg (0.9.8ubuntu2) raring; urgency=low
-
- * Fix build failure with python in multiarch location.
-
- -- Matthias Klose <doko@ubuntu.com> Mon, 08 Apr 2013 18:40:05 +0200
-
-pyg (0.9.8ubuntu1) raring; urgency=low
-
- * Merge from Debian unstable. Remaining changes:
- - adapt /wlp/C/Makefile for multiarched libfl.a
- - include required string.h in wlp/C/commands.l
-
- -- Logan Rosen <logatronico@gmail.com> Mon, 26 Nov 2012 17:28:37 -0500
-
-pyg (0.9.8) unstable; urgency=low
-
- * Added string.h to avoid implicit declarations in yacc definitions.
- Closes: #689349
- * Remove some compile-time warning from wlp/C/wlp.c
- * not ignore errors in clean targets on all Makefile
- * debian/compat bump to 5 (higher should be tested)
- * use dh_python2
-
- -- Cosimo Alfarano <kalfa@debian.org> Tue, 02 Oct 2012 14:04:01 +0100
-
-pyg (0.9.7ubuntu1) quantal; urgency=low
-
- * adapt /wlp/C/Makefile for multiarched libfl.a
- * include required string.h in wlp/C/commands.{l,y}
-
- -- Julian Taylor <jtaylor@ubuntu.com> Mon, 01 Oct 2012 21:10:48 +0200
-
-pyg (0.9.7) unstable; urgency=low
-
- * Added maildrop as a possible deps (Closes: #385771)
- * Typos fixed in HOWTO.
- * Creating md5sum control file
-
- -- Cosimo Alfarano <kalfa@debian.org> Fri, 18 Jul 2008 13:35:57 -0400
-
-pyg (0.9.6-4.2) unstable; urgency=high
-
- * Non-maintainer upload.
- * Add BLDSHARED to Makefile.pre.in for python2.5 compatibility.
- Closes: #476160
- * Add shlibs:Depends in debian/control.
-
- -- Thomas Viehmann <tv@beamnet.de> Sun, 20 Apr 2008 16:49:23 +0200
-
-pyg (0.9.6-4.1) unstable; urgency=low
-
- * Non-maintainer upload.
- * Update package to the last python policy (Closes: #380905).
- * Bump DH_COMPAT to 4.
- * Bump Standards-Version to 3.7.2.
-
- -- Pierre Habouzit <madcoder@debian.org> Sat, 12 Aug 2006 14:01:38 +0200
-
-pyg (0.9.6-4) unstable; urgency=low
-
- * added some more header to be stripepd in mail2news class
- closes:Bug#165322
-
- -- Cosimo Alfarano <kalfa@debian.org> Tue, 2 Mar 2004 21:40:59 +0100
-
-pyg (0.9.6-3.1) unstable; urgency=low
-
- * apply the full (not modified) version of the Matt's patch, for
- compatibility reasons
-
- -- Cosimo Alfarano <kalfa@debian.org> Thu, 6 Nov 2003 23:46:31 +0100
-
-pyg (0.9.6-3) unstable; urgency=low
-
- * applied a modified version of patch from Matt Kraai sent in BTS
- closes:Bug#213936
-
- -- Cosimo Alfarano <kalfa@debian.org> Wed, 5 Nov 2003 11:59:29 +0100
-
-pyg (0.9.6-2) unstable; urgency=low
-
- * typos in debian/control fixed (closes: #125276)
-
- -- Cosimo Alfarano <kalfa@debian.org> Sat, 6 Apr 2002 18:52:57 +0200
-
-pyg (0.9.6-1) unstable; urgency=low
-
- * minor changes to mail2news.py sendemail() method
- now does str(msg) on exception
- * addedd support for void header ('Cc: \n\r') even if it is not fully rfc
- conform.
- * addedd support for multiline header of the form
- "Received: \n\r<text>" (closes: #124396)
- * fixed helo hostname sent, now it's the box name
- (closes: #122851)
- * sorry for the long fixing time, to everyone was waiting for them.
-
- -- Cosimo Alfarano <kalfa@debian.org> Wed, 3 Apr 2002 22:39:47 +0200
-
-pyg (0.9.5-1) unstable; urgency=low
-
- * compiled against python2.1 (wlp.c)
- * debian/control updated for dependancies
- python (>= 2.1), I want it to be usable on any 2.X
- the same for python-dev (closes: #119202)
-
- -- Cosimo Alfarano <kalfa@debian.org> Mon, 12 Nov 2001 22:17:28 +0100
-
-pyg (0.9.4-7) unstable; urgency=low
-
- * fixed some typos
- * fixed import of getopt module (thanks to zack@debian.org)
- * inverted 'if' and 'else' in line 78 of mail2news.py
- that's not a bug, but I do it for readability closes: #105922
-
- -- Cosimo Alfarano <kalfa@debian.org> Fri, 20 Jul 2001 00:49:26 +0200
-
-pyg (0.9.4-6) unstable; urgency=low
-
- * added -P port option to pygm2n
-
- -- Cosimo Alfarano <kalfa@debian.org> Sun, 11 Feb 2001 22:09:03 +0100
-
-pyg (0.9.4-5) unstable; urgency=low
-
- * added suport for NNTP auth (thanks to Marc Sherman for his patch) closes: #84809
-
- -- Cosimo Alfarano <kalfa@debian.org> Sun, 11 Feb 2001 16:43:09 +0100
-
-pyg (0.9.4-4) unstable; urgency=low
-
- * moved files from /usr/sbin to /usr/bin closes: #84806
- * changed Maintainer: filed to kalfa@debian.org addr
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 04 Feb 2000 18:50:00 +0100
-
-pyg (0.9.4-3) unstable; urgency=low
-
- * Sponsored upload.
- * fixed getopt problem with -M
-
- -- Davide Puricelli (evo) <evo@debian.org> Sun, 30 Sep 2000 21:50:00 +0200
-
-pyg (0.9.4-2) unstable; urgency=low
-
- * added Approved: header (pygm2n)
- * added selection of smtpserver for relay (pygn2m)
- * added conversion from In-Reply-To: to References: (pygm2n)
- * added Suggests: news-transport-system , mail-transport-agent
- * removed NNTP-Posting-Host, X-Trace
- * added TODO file
- * mail to news is working fine.
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 30 Sep 2000 21:50:00 +0200
-
-pyg (0.9.4-1) unstable; urgency=low
-
- * Sponsored upload.
- * New upstream version.
- * mail to news gateway is working. Anyway testing it is adviced before use.
-
- -- Davide Puricelli (evo) <evo@debian.org> Mon, 18 Sep 2000 19:45:19 +0200
-
-pyg (0.9.3-1) unstable; urgency=low
-
- * started to write mail to news gateway module
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sat, 16 Sep 2000 17:30:00 +0200
-
-pyg (0.9.2-3) unstable; urgency=low
-
- * Sponsored upload.
- * Swapped binary-{indep,arch} in debian/rules, closes: #71446.
- * Added flex and bison to Build-Depends.
-
- -- Davide Puricelli (evo) <evo@debian.org> Thu, 14 Sep 2000 16:34:10 +0200
-
-pyg (0.9.2-2) unstable; urgency=low
-
- * debian/rules rewritten to a more readble dh_make style.
- * moved example files from debian/ to exaples/
- * dh_stripped *.so
- * dh_undocumented *.py
- * Sponsored upload for Cosimo Alfarano <alfarano@students.cs.unibo.it>
- * Initial Debian release.
-
- -- Davide Puricelli (evo) <evo@debian.org> Sat, 2 Sep 2000 22:35:25 +0200
-
-pyg (0.9.2-1) unstable; urgency=low
-
- * written the whitelist parser (wlp) in yacc+flex
- * written C funtions as python built-in module for wlp
- * fixed parsecommandline() return object
- * added -T opt for test mode and -V for verbose output
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 23 Jul 2000 19:30:00 +0200
-
-pyg (0.9.1-5) unstable; urgency=low
-
- * added file locking on log
- * modified default location of whitelist and log file to homedir.
- log file will moved to /var/log as soon as possible
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 03 Jul 2000 18:00:00 +0200
-
-pyg (0.9.1-4) unstable; urgency=low
-
- * Added Message-Id: logging in whitelist
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 02 Jul 2000 18:30:00 +0200
-
-pyg (0.9.1-3) unstable; urgency=low
-
- * removed Sender: header from nntp article. It is usually set to news@news.domain
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Thu, 29 Jun 2000 16:30:00 +0200
-
-pyg (0.9.1-2) unstable; urgency=low
-
- * modified copyright note in sources
- * moved parse_cmdline() from news2mail.py to pygs
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Thu, 29 Jun 2000 02:30:00 +0200
-
-pyg (0.9.1-1) unstable; urgency=low
-
- * enriched whitelist log system
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Thu, 29 Jun 2000 01:30:00 +0200
-
-pyg (0.9-3) unstable; urgency=low
-
- * corrected load path for modules in pygs. now points to /usr/lib/pyg
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Wed, 28 Jun 2000 00:45:00 +0200
-
-pyg (0.9-2) unstable; urgency=low
-
- * added basic (and rudimental) whitelist functionality (whitelist.py)
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Wed, 28 Jun 2000 00:05:00 +0200
-
-pyg (0.9-1) unstable; urgency=low
-
- * Initial release.
-
- -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 25 Jun 2000 17:52:35 +0200
-
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 7ed6ff8..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 5da5c8d..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,10 +0,0 @@
-This package was debianized by Cosimo Alfarano <alfarano@students.cs.unibo.it> on Sun, 25 Jun 2000 17:52:35 +0200.
-
-Current maintainer and author is Cosimo Alfarano.
-You can find this package at URL HTTP://www.students.cs.unibo.it/~alfarano
-
-Copyright:
-Copyright (C) 2000-2001,2012 Cosimo Alfarano <kalfa@debian.org>
-
-A copy of the GNU General Public License, version 2, can be found in
-/usr/share/common-licenses/GPL-3
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index 7bdd9cc..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/lib/pyg
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index e882956..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,2 +0,0 @@
-HOWTO
-TODO
diff --git a/debian/examples b/debian/examples
deleted file mode 100644
index 7a0a00b..0000000
--- a/debian/examples
+++ /dev/null
@@ -1,2 +0,0 @@
-examples/*
-wlp_test
diff --git a/debian/notused/crontab.ex b/debian/notused/crontab.ex
deleted file mode 100644
index 99b6819..0000000
--- a/debian/notused/crontab.ex
+++ /dev/null
@@ -1 +0,0 @@
-0 4 * * * root pyg_maintenance
diff --git a/debian/notused/diversions.ex b/debian/notused/diversions.ex
deleted file mode 100644
index aebbbe5..0000000
--- a/debian/notused/diversions.ex
+++ /dev/null
@@ -1 +0,0 @@
-<FILE> <Diverted to> <Packagename>
diff --git a/debian/notused/inetd.conf.ex b/debian/notused/inetd.conf.ex
deleted file mode 100644
index 1dcaa61..0000000
--- a/debian/notused/inetd.conf.ex
+++ /dev/null
@@ -1,2 +0,0 @@
-#:OTHER:
-pyg stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pyg
diff --git a/debian/notused/info.ex b/debian/notused/info.ex
deleted file mode 100644
index 31365f9..0000000
--- a/debian/notused/info.ex
+++ /dev/null
@@ -1,15 +0,0 @@
-# This is a configuration files for installing a .info menu
-# The Description to be placed into the directory
-DESCR="Description"
-
-# The section this info file should be placed in (Regexp) followed by
-# the new section name to be created if the Regexp does not match
-# (Optional. If not given the .info will be appended to the directory)
-#SECTION_MATCH="Regexp"
-#SECTION_NAME="New Section Name"
-
-# The file referred to from the Info directory
-FILE=pyg.info
-
-# Optional. The files to be copied to /usr/share/info
-#FILES=*.info
diff --git a/debian/notused/init.d.ex b/debian/notused/init.d.ex
deleted file mode 100644
index c2302bb..0000000
--- a/debian/notused/init.d.ex
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-#
-# This file was automatically customized by debmake on Sun, 25 Jun 2000 17:52:35 +0200
-#
-# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
-# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>.
-# Modified for Debian by Christoph Lameter <clameter@debian.org>
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-DAEMON=/usr/sbin/pyg
-# The following value is extracted by debstd to figure out how to generate
-# the postinst script. Edit the field to change the way the script is
-# registered through update-rc.d (see the manpage for update-rc.d!)
-FLAGS="defaults 50"
-
-test -f $DAEMON || exit 0
-
-case "$1" in
- start)
- start-stop-daemon --start --verbose --exec $DAEMON
- ;;
- stop)
- start-stop-daemon --stop --verbose --exec $DAEMON
- ;;
- #reload)
- #
- # If the daemon can reload its config files on the fly
- # for example by sending it SIGHUP, do it here.
- #
- # If the daemon responds to changes in its config file
- # directly anyway, make this a do-nothing entry.
- #
- # start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON
- # ;;
- restart|force-reload)
- #
- # If the "reload" option is implemented, move the "force-reload"
- # option to the "reload" entry above. If not, "force-reload" is
- # just the same as "restart".
- #
- start-stop-daemon --stop --verbose --exec $DAEMON
- sleep 1
- start-stop-daemon --start --verbose --exec $DAEMON
- ;;
- *)
- echo "Usage: /etc/init.d/pyg {start|stop|restart|force-reload}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/notused/manpage.1.ex b/debian/notused/manpage.1.ex
deleted file mode 100644
index 4ce8b61..0000000
--- a/debian/notused/manpage.1.ex
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH NAME SECTION
-.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
-.\" other parms are allowed: see man(7), man(1)
-.SH NAME
-pyg \- programs to do something
-.SH SYNOPSIS
-.B pyg
-.I "[options] files ..."
-.br
-.B bar
-.I "[options] files ..."
-.SH "DESCRIPTION"
-This manual page documents briefly the
-.BR pyg ,
-and
-.B bar
-commands.
-This manual page was written for the Debian GNU/Linux distribution
-because the original program does not have a manual page.
-Instead, it has documentation in the GNU Info format; see below.
-.PP
-.B pyg
-is a program that...
-.SH OPTIONS
-The programs follow the usual GNU command line syntax, with long
-options starting with two dashes (`-').
-A summary of options are included below.
-For a complete description, see the Info files.
-.TP
-.B \-h, \-\-help
-Show summary of options.
-.TP
-.B \-v, \-\-version
-Show version of program.
-.SH "SEE ALSO"
-The programs are documented fully by
-.IR "The Rise and Fall of a Fooish Bar" ,
-available via the Info system.
-.SH AUTHOR
-This manual page was written by Kame Alfa III <kame@aragorn.lorien.org>,
-for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/notused/menu.ex b/debian/notused/menu.ex
deleted file mode 100644
index b608ca8..0000000
--- a/debian/notused/menu.ex
+++ /dev/null
@@ -1,2 +0,0 @@
-?package(pyg):needs=X11|text|vc|wm section=Apps/see-menu-manual\
- title="pygs" command="/usr/sbin/pygs"
diff --git a/debian/notused/watch.ex b/debian/notused/watch.ex
deleted file mode 100644
index 5aba8f5..0000000
--- a/debian/notused/watch.ex
+++ /dev/null
@@ -1,5 +0,0 @@
-# Example watch control file for uscan
-# Rename this file to "watch" and then you can run the "uscan" command
-# to check for upstream updates and more.
-# Site Directory Pattern Version Script
-sunsite.unc.edu /pub/Linux/Incomingu pyg-*.tar.gz debian uupdate
diff --git a/debian/pygm2n.1 b/debian/pygm2n.1
deleted file mode 100644
index 63f2e09..0000000
--- a/debian/pygm2n.1
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" wing requests are required for all man pages.
-.TH pygm2n 1 "Sun Sep 12 18:10:00 CEST 2000" "" "Python Gateway mail to news"
-.SH NAME
-pygm2n - Python Gateway mail to news
-.SH SYNOPSIS
-.B pygm2n
-.BR -n
-.IR newsgroups
-[
-.BR -s
-.IR newsserver
-]
-[
-.BR -h
-]
-
-.SH DESCRIPTION
-.B IMPORTANT:
-this man page is to be continued. The Whole pyg gateway is in
-.B devel.\ state.
-try -h option for more detailed option.
-
-pygm2n reads from stdin an email, sending it to newsgroups, a comma separated list without spaces of newsgroup names (at least one), rfc799 compliant.
-
-If pygm2n reads from stdin a sigle line starting with /, it is
-considered an absolute path to a single-email mailbox,
-so pygm2n will open and read it.
-
-.B Note
-that now pyg can't read a real mailbox, with many emails. If you
-give it in input, pyg will post the whole mailbox as a single email.
-
-\" The following requests should be uncommented and
-.\" used where appropriate. This next request is
-.\" for sections 2 and 3 function return values only.
-.\" .Sh RETURN VALUES
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" .Sh ENVIRONMENT
-.\" .Sh FILES
-.SH EXAMPLES
-There is some documetation in /urs/share/doc/pyg
-
-I created mailgate user (moderator of local.moderated ng).
-Subscribe to a list with this user (or simply email one message to).
-Every email posted to this user will send to newsgroups,
-in its .procmailrc I've put something like:
-
-:0 bh
-* ^From *mailinglist-request@lists.debian.org
-| $HOME/pygm2n -n local.debian.mailinglist
-
-
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" (command return values (to shell) and
-.\" fprintf/stderr type diagnostics)
-.\" .Sh DIAGNOSTICS
-.\" The next request is for sections 2 and 3 error
-.\" and signal handling only.
-.\" .Sh ERRORS
-.\" .Sh SEE ALSO
-.\" .Sh STANDARDS
-.\" .Sh HISTORY
-.SH AUTHORS
-Cosimo Alfarano <alfarano@students.cs.unibo.it>
-
-.SH BUGS
-Boh. send any bug, advice or opinion to the author, please.
-
diff --git a/debian/pygn2m.1 b/debian/pygn2m.1
deleted file mode 100644
index 5b2750e..0000000
--- a/debian/pygn2m.1
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" wing requests are required for all man pages.
-.TH pygn2m 1 "Sun Sep 12 22:40:00 CEST 2000" "" "Python Gateway news to mail"
-.SH NAME
-pygn2m - Python Gateway news to mail
-.SH SYNOPSIS
-.B pygs
-.BR -t
-.IR recipient@domain1
-.BR -s
-.IR sender@domain2
-[
-.BR -e
-.IR envelope@domain3
-]
-[
-.BR -h
-]
-
-.SH DESCRIPTION
-.B IMPORTANT:
-this man page is to be continued. The Whole pyg gateway is in
-.B devel.\ state.
-try -h option for more detailed option.
-
-pygn2m reads from stdin a nntp article, sending it to recipient@domain1
-a rfc822 compliant email setting Resent-Sender: sender@domain2
-and envelope envelope@domain3 if exists, else sender@domain2.
-
-If pygn2m reads from stdin a sigle line starting with /, it is
-considered an absolute path to an article (ie in a spool),
-so pygn2m will open and read it.
-
-\" The following requests should be uncommented and
-.\" used where appropriate. This next request is
-.\" for sections 2 and 3 function return values only.
-.\" .Sh RETURN VALUES
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" .Sh ENVIRONMENT
-.\" .Sh FILES
-.SH EXAMPLES
-There is some documetation in /urs/share/doc/pyg
-
-I created mailgate user (moderator of local.moderated ng).
-Every article posted in local.moderated is sent to mailgate,
-in its .procmailrc I've put:
-
-:0 bhc
-* ^To: *local-moderated
-| $HOME/pygs -t kalfa@localhost -e mailgate@students.cs.unibo.it -s 'cosimo@students.cs.unibo.it'
-
-
-where kalfa@localhost is the recipient (usually a mailing list)
-
-Here is an header extract from kalfa@localhost mbox:
-
-From mailgate@students.cs.unibo.it
-From: whosentnntparticle@domain4
-To: kalfa@localhost
-Resent-Sender: cosimo@students.cs.unibo.it
-
-note that sender and envelope are different. rfc822 says that Sender: have to be a human user (not a program or similia). envelope can mailgate user.
-
-
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" (command return values (to shell) and
-.\" fprintf/stderr type diagnostics)
-.\" .Sh DIAGNOSTICS
-.\" The next request is for sections 2 and 3 error
-.\" and signal handling only.
-.\" .Sh ERRORS
-.\" .Sh SEE ALSO
-.\" .Sh STANDARDS
-.\" .Sh HISTORY
-.SH AUTHOR
-Cosimo Alfarano <alfarano@students.cs.unibo.it>
-
-.SH BUGS
-Boh. send any bug to the author, please.
-
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 5d336e3..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/make -f
-
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-export package=pyg
-export debdestdir=$(CURDIR)/debian/$(package)
-
-build: build-stamp
-
-build-arch: build
-build-indep: build
-
-build-stamp:
- dh_testdir
-
- $(MAKE) bin #CFLAGS="-O2 -g -Wall"
- touch build-stamp
-
-clean:
- dh_testdir
-
- rm -f build-stamp
- $(MAKE) clean
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- $(MAKE) install DESTDIR=$(debdestdir)
-
-
-binary-arch: build install
- dh_testdir
- dh_testroot
-
- dh_installdirs
- dh_installchangelogs
- dh_installdocs
- dh_installman $(CURDIR)/debian/pygn2m.1 $(CURDIR)/debian/pygm2n.1
-# dh_installinfo
-
- # these are class modules, they don't need manpages,
- # undocumented link means I'm planning to document them.
- #dh_undocumented whitelist.py.3 news2mail.py.3 mail2news.py.3 pyginfo.py.3
- dh_installexamples
-
- dh_fixperms
- # dh_fixperms doesn't fix perms in /usr/lib subdirs
- chmod 0644 $(debdestdir)/usr/lib/$(package)/*.py
- # make sure pyg executables have right permission
- chmod 0755 $(debdestdir)/usr/bin/pygn2m
- chmod 0755 $(debdestdir)/usr/bin/pygm2n
-
- # dh_fixperms doesn't fix perms in /usr/share/doc subdirs
- find $(debdestdir)/usr/share/doc/$(package) -type d -exec chmod 0755 {} \;
-
- dh_python2
-
- dh_strip
- dh_compress
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-
-# no binary arch-indep is present
-binary-indep: build install
- dh_testdir
- dh_testroot
-
-binary: binary-indep binary-arch
-
-.PHONY: build build-arch build-indep binary binary-arch binary-indep clean install
diff --git a/debian/whitelist.5 b/debian/whitelist.5
deleted file mode 100644
index d129243..0000000
--- a/debian/whitelist.5
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" wing requests are required for all man pages.
-.Dd July 23, 2000
-.Os Debian GNU/Linux
-.Dt whitelist 5
-.Sh NAME
-.Nm pygs
-.Nd the PYthon Gateway Script
-.Sh SYNOPSIS
-pygs
--t recipient@domain1
--s sender@domain2
-[-e envelope@domain3]
-[-d]
-[-T]
-[-V]
-[-l logfile]
-[-w whitelist]
-[-h]
-.Sh DESCRIPTION
-NOTE: this man page is to be continued :)
-
-pygs read from stdin a nntp article, sending it to recipient@domain1 a rfc822 compliant email setting Resent-Sender: sender@domain2 and envelope envelope@domain3 if exists, else sender@domain2.
-.Sh OPTIONS
-.Tp 0.5i
-.B \-t
-
-\" The following requests should be uncommented and
-.\" used where appropriate. This next request is
-.\" for sections 2 and 3 function return values only.
-.\" .Sh RETURN VALUES
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" .Sh ENVIRONMENT
-.\" .Sh FILES
-.Sh EXAMPLES
-There is some documetation in /urs/share/doc/pyg
-
-I created mailgate user (moderator of local.moderated ng).
-Every article posted in local.moderated is sent to mailgate,
-in its .procmailrc I've put:
-
-.Bd
-.Li :0 bhc
-.Li \ * ^To: *local-moderated
-.Li | $HOME/pygs -t kalfa@localhost -e mailgate@students.cs.unibo.it -s 'cosimo@students.cs.unibo.it'
-.Ed
-
-where kalfa@localhost is the recipient (it usually is a mailing list)
-
-an header extract from kalfa@localhost mbox:
-
-From mailgate@students.cs.unibo.it
-From: whosentnntparticle@domain4
-To: kalfa@localhost
-Resent-Sender: cosimo@students.cs.unibo.it
-
-note that sender and envelope are different. rfc822 says that Sender: have to be a human user (not a program or similia). envelope can mailgate user.
-
-.
-
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" (command return values (to shell) and
-.\" fprintf/stderr type diagnostics)
-.\" .Sh DIAGNOSTICS
-.\" The next request is for sections 2 and 3 error
-.\" and signal handling only.
-.\" .Sh ERRORS
-.\" .Sh SEE ALSO
-.\" .Sh STANDARDS
-.\" .Sh HISTORY
-.Sh AUTHORS
-Cosimo Alfarano <alfarano@students.cs.unibo.it>
-.Sh BUGS
-Boh. send any bug to the author
-.An , please.
-
diff --git a/mail2news.py b/mail2news.py
index d340432..697de0b 100644
--- a/mail2news.py
+++ b/mail2news.py
@@ -46,7 +46,7 @@ class mail2news:
def readfile(self):
for line in sys.stdin.readlines():
- self.email.append(line)
+ sef.email.append(line)
if(len(self.email) == 1 and self.email[0][0] == '/'):
file = self.email[0][:-1]
diff --git a/mail2news.py.withtab b/mail2news.py.withtab
deleted file mode 100644
index 8b80e0c..0000000
--- a/mail2news.py.withtab
+++ /dev/null
@@ -1,319 +0,0 @@
-"""Mail to news gateway script. Copyright 2000 Cosimo Alfarano
-
-Author: Cosimo Alfarano
-Date: September 16 2000
-
-mail2news.py - Copyright 2000 by Cosimo Alfarano <Alfarano@Students.CS.UniBo.It>
-You can use this software under the terms of the GPL. If we meet some day,
-and you think this stuff is worth it, you can buy me a beer in return.
-
-Thanks to md for this useful formula. Beer is beer.
-
-Gets news email and sends it via SMTP.
-
-class mail2news is hopefully conform to rfc850.
-
-"""
-
-import sys
-from os import unlink, getpid
-from socket import gethostbyaddr, gethostname
-import string
-from re import findall
-import time
-import nntplib
-import pyginfo
-import tempfile
-
-class mail2news:
- """news to mail gateway class"""
-
-
- reader = None # mode reader
-# newsgroups = None # Newsgroups: local.test,local.moderated...
-# approved = None # Approved: kame@aragorn.lorien.org
- newsserver = 'localhost' # no comment :)
- port = 119
- user = None
- password = None
-
- hostname = gethostbyaddr(gethostname())[0]
-
- heads_dict, smtpheads, nntpheads = {}, {}, {}
- email, headers, body = [], [], []
-
-
- def readfile(self):
-
- for line in sys.stdin.readlines():
- self.email.append(line)
-
- if(len(self.email) == 1 and self.email[0][0] == '/'):
- file = self.email[0][:-1]
- del self.email[0]
- for line in open(file,'r').readlines():
- self.email.append(line)
-
- return 1
-
-
- def parseemail(self):
- """get news email from file or stdin and separate heads from body
-
- REMEBER: headers value has '\n' as last char.
- Use string[:-1] to ignore newline.
- """
-
- try:
- body = 0 # are we in body or in headers?
-
- for line in self.email:
- if not body and len(line) == 1:
- body = 1 # starts email body section
-
- if not body:
- try:
- # if it is a multi-line header like Received:
- if not line[0] in [' ','\t']:
- try:
- head, value = string.split(line, ' ', 1)
- except string.index_error:
- value = ''
- self.smtpheads[head] = value
- else:
- self.smtpheads[head] = '%s%s' % \
- (self.smtpheads[head], line)
- except (string.index_error), message:
- print 'line: %s' % line
- print '(probably missing couple "Header: value" in %s)' % line
- sys.exit(1)
-
- elif len(line) > 0 and body:
- self.body.append(line)
-
- except (string.index_error), message:
- print message
- sys.exit(1)
-
- return self.smtpheads, self.body
-
- def puthead(self, dict, list, key):
- """private, transform dict entries in list entries
- Appends key of dict to list, deleting it from dict.
- """
-
- if dict.has_key(key):
- list.append(key + ' ' + dict.get(key))
- del dict[key]
- else:
- return 0
- return 1
-
- def sortheads(self):
- """make list sorted by heads: From: To: Subject: first, others, X-*, X-Resent-* last"""
-
- set = ('Newsgroups:','From:','To:','X-To:','Cc:','Subject:','Date:','Approved:','References:','Message-Id:') # put at top
-
- for k in set:
- self.puthead(self.heads_dict,self.headers,k)
-
- for k in self.heads_dict.keys():
- if k[:2] != 'X-' and k[:9] != 'X-Resent-' and k not in set:
- self.puthead(self.heads_dict,self.headers,k)
-
- for k in self.heads_dict.keys():
- if k[:2] == 'X-':
- self.puthead(self.heads_dict,self.headers,k)
-
- for k in self.heads_dict.keys():
- if k[:9] == 'X-Resent-':
- self.puthead(self.heads_dict,self.headers,k)
-
- return self.headers
-
-
- def mergeheads(self):
- """make a unique headers dictionary from NNTP and SMTP
- single headers dictionaries."""
-
- self.heads_dict = {}
-
- try:
- for header in self.smtpheads.keys(): # fill it w/ smtp old heads
- self.heads_dict[header] = self.smtpheads[header]
-
- for header in self.nntpheads.keys(): # and replace them w/ nntp new heads
- self.heads_dict[header] = self.nntpheads[header]
-
- except KeyError, message:
- print message
-
- return self.heads_dict
-
- def addheads(self):
- """add new header like X-Gateway:
- """
-
- info = pyginfo.pygsinfo()
-
- try:
- self.heads_dict['X-Gateway:'] = info.PROGNAME + ' ' + \
- info.PROGDESC + ' - Mail to News\n'
-
-# it is nntpheads stuff
-# if(self.newsgroups):
-# self.heads_dict['Newsgroups:'] = self.newsgroups
-
-# if(self.approved):
-# self.heads_dict['Approved:'] = self.approved
-
- except KeyError, message:
- print message
-
- return self.heads_dict
-
- def renameheads(self):
- """rename headers such as Resent-*: to X-Resent-*:
-
- headers renamed are useless or not rfc 977/850 copliant
- handles References/In-Reply-To headers
- """
- try:
-
-### test
-# if(post):
-# if(self.heads_dict.has_key(post)):
-# self.heads_dict['X-Original-' + post] = self.heads_dict[post]
-#
-# self.heads_dict[post] = self.heads_dict[pre]
-# del(self.heads_dict[pre])
-#
-# else:
-# if(pre[0:2] == 'X-' and self.heads_dict.has_key(pre)):
-# self.heads_dict['X-Original-' + pre] = self.heads_dict[pre]
-# elif(not pre[0:2] == 'X-' and self.heads_dict.has_key('X-' + pre)):
-# self.heads_dict['X-' + pre] = self.heads_dict[pre]
-# del(self.heads_dict[pre])
-### end test
-
- for key in self.heads_dict.keys():
- if(key[:7] in ['Resent-']):
- if(self.heads_dict.has_key('X-' + key)):
- self.heads_dict[ 'X-Original-' + key ] = self.heads_dict['X-' + key]
- self.heads_dict[ 'X-' + key ] = self.heads_dict[key]
- del self.heads_dict[key]
-
-
- # In rfc822 References: is considered, but many MUA doen't put it.
- if(not self.heads_dict.has_key('References:') and self.heads_dict.has_key('In-Reply-To:')):
- print self.heads_dict['In-Reply-To:']
-
- # some MUA uses msgid without '<' '>'
-# ref = findall('([^\s<>\']+@[^\s<>;:\']+)', \
- # but I prefer use RFC standards
- ref = findall('(<[^<>]+@[^<>]+>)', \
- self.heads_dict['In-Reply-To:'])
-
- # if found, keep first element that seems a Msg-ID.
- if(ref and len(ref)):
- self.heads_dict['References:'] = '%s\n' % ref[0]
-
-# if(self.heads_dict.has_key('To:')):
-# self.heads_dict['X-To:'] = self.heads_dict['To:']
-# del self.heads_dict['To:']
-
- except KeyError, message:
- print message
-
- return self.heads_dict
-
-
- def removeheads(self, heads = None):
- """remove headers like Xref: Path: Lines:
- """
-
- try:
- # removing some others useless headers .... (From is not From:)
-
- rmheads = ['Received:','From','NNTP-Posting-Host:','X-Trace']
- if(heads):
- rmheads.append(heads)
-
- for head in rmheads:
- if self.heads_dict.has_key(head):
- del self.heads_dict[head]
-
-# if self.heads_dict.has_key('From'): # neither 'From ' nor 'From:'
-# del self.heads_dict['From']
-
-# if self.heads_dict.has_key('NNTP-Posting-Host:'): # neither 'From ' nor 'From:'
-# del self.heads_dict['']
-
-
-# if self.heads_dict.has_key('Lines:'):
-# del self.heads_dict['Lines:']
-
- # it is usually set by INN, if ng is moderated...
-# if self.heads_dict.has_key('Sender:'):
-# del self.heads_dict['Sender:']
-
-
- if self.heads_dict.has_key('Message-id:'):
- self.heads_dict['Message-Id:'] = self.heads_dict['Message-id:']
- del(self.heads_dict['Message-id:'])
-
- if self.heads_dict.has_key('Message-ID:'):
- self.heads_dict['Message-Id:'] = self.heads_dict['Message-ID:']
- del(self.heads_dict['Message-ID:'])
-
- # If message-id is not present, I generate it
- if not self.heads_dict.has_key('Message-Id:'):
- msgid = '<pyg.%d@tuchailepuppapera.org>\n' % (getpid())
- self.heads_dict['Message-Id:'] = msgid
-
- except KeyError, message:
- print message
-
- return self.heads_dict
-
- def sendemail(self):
- """Talk to NNTP server and try to send email."""
- try:
- msglist = []
-
- n = nntplib.NNTP(self.newsserver, self.port, self.user, self.password)
-
- if(self.reader):
- n.putline('mode reader')
- resp = n.getline()
- print resp
-
- resp = n.shortcmd('POST')
-
- # sett RFC977 2.4.2
- if resp[0] <> '3':
- raise n.error_reply, str(resp)
-
- for line in self.headers:
- if not line:
- break
- if line[-1] == '\n':
- line = line[:-1]
- if line[:1] == '.':
- line = '.' + line
- n.putline(line)
-
- for line in self.body:
- if not line:
- break
- if line[-1] == '\n':
- line = line[:-1]
- if line[:1] == '.':
- line = '.' + line
- n.putline(line)
-
- n.putline('.')
- n.quit()
- return None
- except (nntplib.error_reply, nntplib.error_temp, nntplib.error_perm, nntplib.error_proto, nntplib.error_data), message:
- return 'NNTP: ' + str(message)
diff --git a/pygm2n b/pygm2n
index 428ca5b..cf677f2 100755
--- a/pygm2n
+++ b/pygm2n
@@ -117,17 +117,6 @@ def usage():
print '-T for test mode (not send article via NNTP)'
print '-V for verbose output (usefull with -T option for debugging)'
-
-
-
-
-
-
-
-
-
-
-
"""main is structured in 4 phases:
1) check and set pyg's internal variables
2) check whitelist for users' permission