aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/README.example31
-rw-r--r--examples/articletest.accepted20
-rw-r--r--examples/articletest.denied19
-rw-r--r--examples/mail16
-rw-r--r--examples/whitelist.example14
5 files changed, 100 insertions, 0 deletions
diff --git a/examples/README.example b/examples/README.example
new file mode 100644
index 0000000..5dea2fe
--- /dev/null
+++ b/examples/README.example
@@ -0,0 +1,31 @@
+News2Mail:
+
+Using whitelist.example you can try to post articletest.accepted and
+articletest.denied.
+The first one will be accepted by pygs, second one rejected
+
+try to type something like (as normal user):
+
+$ pygn2m -TVt your@local.address -s your@local.address -e your@local.address \
+ -w /usr/share/doc/pyg/example/whitelist.example -l /tmp/pyg.log \
+ < /usr/share/doc/pyg/example/one_article_example
+
+It will reject to post articletest.denied because there are no 'From:' command
+in any section of whitelist.example.
+While it will post articletest.accepted because in the third section
+there is "From: = 'kame@inwind.it'" command.
+
+using -T option will only test, without opening a connection to your
+MTA. -V will change in verbose mode. see manpage for more info.
+
+
+
+Mail2News:
+
+/usr/share/doc/pyg/example/mail is a simple mail in unix mbox format,
+you can use it to test m2n functionality.
+
+$ pygm2n -TVn local.news.group < /usr/share/doc/pyg/example/mail
+
+format a news article to be posted to local.news.group newsgroup. Since
+-TV is present, it doen't open any connection.
diff --git a/examples/articletest.accepted b/examples/articletest.accepted
new file mode 100644
index 0000000..9c06457
--- /dev/null
+++ b/examples/articletest.accepted
@@ -0,0 +1,20 @@
+Path: pyg.server.tld!gateway
+From: pyg@pyg.server.tld (PYG)
+Newsgroups: local.moderated
+Subject: pyg's article test
+Date: 10 Jun 2000 23:20:47 +0200
+Organization: Debian GNU/Linux
+Lines: 8
+Sender: mailgate@localhost
+Approved: mailgate@localhost
+Reply-To: pyg@localhost
+NNTP-Posting-Host: pyg.server.tld
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+X-Trace: pyg.server.tld 960672047 927 192.168.1.2 (10 Jun 2000 21:20:47 GMT)
+Xref: pyg.server.tld local.moderated:4
+
+test gateway
+
+.
diff --git a/examples/articletest.denied b/examples/articletest.denied
new file mode 100644
index 0000000..7383eb3
--- /dev/null
+++ b/examples/articletest.denied
@@ -0,0 +1,19 @@
+Path: pyg.server.tld!gateway
+From: pyg@localhost (PYG)
+Newsgroups: local.moderated
+Subject: pyg's article test
+Date: 10 Jun 2000 23:20:47 +0200
+Organization: Debian GNU/Linux
+Lines: 8
+Sender: mailgate@pyg.server.tld
+Approved: mailgate@localhost
+NNTP-Posting-Host: pyg.server.tld
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+X-Trace: pyg.server.tld 960672047 927 192.168.1.2 (10 Jun 2000 21:20:47 GMT)
+Xref: pyg.server.tld local.moderated:4
+
+test gateway
+
+.
diff --git a/examples/mail b/examples/mail
new file mode 100644
index 0000000..6db6362
--- /dev/null
+++ b/examples/mail
@@ -0,0 +1,16 @@
+From pyg@localhost Sun Oct 1 16:40:41 2000
+Return-Path: <pyg@localhost>
+Received: by pyg.server.tld (Postfix, from userid 1000)
+ id 096A91838A; Sun, 1 Oct 2000 16:40:40 +0200 (CEST)
+Date: Sun, 1 Feb 2002 16:40:40 +0200
+From: Pyg <pyg@localhost.com>
+To: User <user@localhost.com>
+X-Multiline:
+ this header probably broke RFC, but is frequent.
+Subject: test
+Message-ID: <20001001164040.Aa8326@localhost>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+User-Agent: Mutt/1.2.5i
+
+one line test
diff --git a/examples/whitelist.example b/examples/whitelist.example
new file mode 100644
index 0000000..9f74108
--- /dev/null
+++ b/examples/whitelist.example
@@ -0,0 +1,14 @@
+<kame@innocent.com> {
+ From: = 'ME' Sender: = "Cosimo" Reply-to = "me"
+}
+
+<alfarano@students.cs.unibo.it> {
+ From: = 'Cosimo Alfarano'
+ X-Firstname: = 'Cosimo'
+}
+
+<kame@innocent.com> {
+ From: = 'kame@inwind.it'
+ Reply-to: = "KA"
+ Sender: = "Kalfa"
+}