summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-09-27 02:43:39 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2011-09-27 02:43:39 +0200
commit5617c91957851165722a23f4d57ac6b7a3170ce0 (patch)
tree0de1dac6d95de78138b2fbbc2d4f59f9c2ca7e39
downloadsites-5617c91957851165722a23f4d57ac6b7a3170ce0.tar.gz
sites-5617c91957851165722a23f4d57ac6b7a3170ce0.tar.bz2
sites-5617c91957851165722a23f4d57ac6b7a3170ce0.zip
initial import
-rwxr-xr-xindex.py56
-rw-r--r--static/css/main.css129
-rw-r--r--static/img/PythonPowered.pngbin0 -> 945 bytes
-rw-r--r--static/img/gnu-head-tiny.jpgbin0 -> 3049 bytes
-rw-r--r--static/img/mailman.jpgbin0 -> 2022 bytes
-rw-r--r--static/img/penguin.pngbin0 -> 6147 bytes
-rw-r--r--templates/index.html75
-rw-r--r--templates/layout.html57
-rw-r--r--templates/new.html67
-rw-r--r--templates/spam.html157
10 files changed, 541 insertions, 0 deletions
diff --git a/index.py b/index.py
new file mode 100755
index 0000000..bd0a491
--- /dev/null
+++ b/index.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+from web import template, form, application, ctx
+from socket import gethostbyaddr
+
+urls = (
+ '/', 'index',
+ '/neu.*', 'new',
+ '/new', 'new',
+ '/help/spam.*', 'spam',
+)
+
+render = template.render('templates/', base='layout');
+
+create_form = form.Form(
+ form.Textbox('name',
+ form.notnull,
+ description = 'Name of your list'),
+ form.Textbox('email',
+ form.notnull,
+ form.regexp('.*fu-berlin\.de', 'E-mail address should end with fu-berlin.de'),
+ description = 'Your E-mail address'),
+ )
+
+class index:
+ def GET(self):
+ return self.POST();
+
+ def POST(self):
+ return render.index()
+
+class spam:
+ def GET(self):
+ return self.POST();
+
+ def POST(self):
+ return render.spam()
+
+class new:
+ def GET(self):
+ form = create_form()
+ user = {'ip': ctx.ip, 'host': gethostbyaddr(ctx.ip)[0]}
+ return render.new(form, user)
+
+ def POST(self):
+ form = create_form()
+ user = {'ip': ctx.ip, 'host': gethostbyaddr(ctx.ip)[0]}
+ if not form.validates():
+ return render.new(form, user)
+ else:
+ return "Done."
+
+
+if __name__ == "__main__":
+ app = application(urls, globals(), autoreload=False)
+ app.run()
diff --git a/static/css/main.css b/static/css/main.css
new file mode 100644
index 0000000..8a8df82
--- /dev/null
+++ b/static/css/main.css
@@ -0,0 +1,129 @@
+body {
+ margin: 0;
+ padding: 0;
+ background: #ffffff;
+ min-width: 800px;
+}
+
+p.headline {
+ font-size: 2.4em;
+ margin: 0.3em 0;
+ font-weight: blod;
+}
+
+p.subtext {
+ font-size: 1.7em;
+ margin: 10px 0;
+ font-weight: blod;
+}
+
+span.spline {
+ color: red;
+}
+
+#header {
+ text-align: center;
+}
+
+#header table {
+ margin: 0 auto;
+}
+
+div#title {
+ background: #9cf;
+ font-size: 1.8em;
+ font-weight: blod;
+ padding: 5px 0;
+ text-align: center;
+}
+
+.small {
+ font-size: 0.8em;
+}
+
+#footer {
+ font-size: 0.9em;
+ text-align: center;
+}
+
+div.info, div.create {
+ margin: 2em auto;
+}
+
+div.info {
+ width: 50%;
+}
+
+div.create {
+ width: 70%;
+}
+
+div.header {
+ background: #fff0d0;
+ padding: 0.2em;
+}
+
+div#status .ok {
+ color: green;
+}
+
+div#status {
+ text-align: center;
+}
+
+div#status span {
+ font-size: 2em;
+}
+
+div.create li {
+ margin: 1em 0;
+}
+
+div.create li li {
+ margin: 0;
+}
+
+form table {
+ width: 80%;
+ margin: 0 auto;
+}
+
+form td, form th {
+ padding-top: 1em;
+}
+
+form th {
+ text-align: right;
+ font-weight: normal;
+ vertical-align: top;
+ padding-right: 1em;
+ width: 40%;
+}
+
+form .wrong {
+ display: block;
+ font-weight: normal;
+ color: red;
+ margin-top: 0.2em;
+}
+
+input {
+ width: 20em;
+}
+
+input.submit {
+ width: 10em;
+ margin: 1em auto 0;
+ padding: 0.4em;
+ display: block;
+ font-weight: bold;
+}
+
+div#info.create {
+ text-align: center;
+}
+
+div#info.create .header {
+ text-align: left;
+ margin-bottom: 1em;
+}
diff --git a/static/img/PythonPowered.png b/static/img/PythonPowered.png
new file mode 100644
index 0000000..2e9d99c
--- /dev/null
+++ b/static/img/PythonPowered.png
Binary files differ
diff --git a/static/img/gnu-head-tiny.jpg b/static/img/gnu-head-tiny.jpg
new file mode 100644
index 0000000..441be50
--- /dev/null
+++ b/static/img/gnu-head-tiny.jpg
Binary files differ
diff --git a/static/img/mailman.jpg b/static/img/mailman.jpg
new file mode 100644
index 0000000..94a4c01
--- /dev/null
+++ b/static/img/mailman.jpg
Binary files differ
diff --git a/static/img/penguin.png b/static/img/penguin.png
new file mode 100644
index 0000000..7ff0c0d
--- /dev/null
+++ b/static/img/penguin.png
Binary files differ
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..99bf8b9
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,75 @@
+$var title: Mailinglisten
+$var headline:
+ Willkommen auf dem Mailinglistenserver von
+ <a href="http://www.spline.inf.fu-berlin,de">spline</a>!<br />
+
+ <span class="small">Welcome to
+ the <a href="http://www.spline.inf.fu-berlin.de">spline</a>
+ mailing lists server!</span>
+
+
+<div class="info">
+ <div class="header">
+ <b>&Uuml;bersicht</b> aller bekanntgegebenen Listen:
+ </div>
+
+ <span class="small"><b>Overview</b> of publicly-advertised mailing lists:</span><br />
+ <tt>https://</tt>
+ <a href="/mailman/listinfo/">
+ <b><tt>lists.spline.inf.fu-berlin.de/mailman/listinfo/</tt></b>
+ </a>
+</div>
+
+<div class="info">
+ <div class="header">
+ <b>Neue Mailingliste</b> einrichten:
+ </div>
+
+ <span class="small">To <b>create</b> a new mailing list:</span><br />
+ <tt>https://</tt>
+ <a href="/neu/">
+ <b><tt>lists.spline.inf.fu-berlin.de/neu/</tt></b>
+ </a><br />
+ (Einrichten nur aus der FU)<br />
+ <span class="small">(restricted access, only <tt>*.fu-berlin.de</tt> may <i>create</i> mailing lists)</span>
+</div>
+
+<div class="info">
+ <div class="header">
+ <b>HILFE / HELP</b>
+ </div>
+
+ <ul>
+ <li>
+ <b>
+ <a href="http://www.spline.inf.fu-berlin.de/index.php/Howtos:DFN-CA_ZertifikateUsers">Firefox
+ + Fehlermeldung "Sichere Verbindung fehlgeschlagen"?</a>
+ </b>
+ </li>
+
+ <li>
+ Sich <a href="help/unsubscribe.de.html"> aus einer
+ Mailingliste <b>austragen</b></a>
+ </li>
+
+ <li>
+ How to <a href="help/unsubscribe.en.html"><b>unsubscribe</b>
+ from a mailing list</a>
+ </li>
+
+ <li>
+ Hinweise zur <b><a href="help/spam.html">Spam-Filterung</a></b>
+ f&uuml;r AdministratorInnen
+ </li>
+ </ul>
+</div>
+
+<hr>
+
+<div id="status">
+ system status:<br />
+ <span class="ok">
+ <b>+++ RUNNING +++</b>
+ </span>
+</div>
+
diff --git a/templates/layout.html b/templates/layout.html
new file mode 100644
index 0000000..6e24a22
--- /dev/null
+++ b/templates/layout.html
@@ -0,0 +1,57 @@
+$def with (content)
+<!DOCTYPE html>
+<html>
+<head>
+ <title>spline - $content.title</title>
+ <link type="text/css" rel="stylesheet" href="/static/css/main.css">
+</head>
+
+<body>
+ <div id="header">
+ <table cellspacing="10" cellpadding="5">
+ <tr>
+ <td>
+ <a href="/">
+ <img border="0" src="/static/img/penguin.png" alt="Pinguin" />
+ </a>
+ </td>
+
+ <td>
+ <p class="headline">spline</p>
+ <p class="subtext">
+ <span class="spline">s</span>tudentisches
+ <span class="spline">p</span>rojekt
+ <span class="spline">li</span>nux
+ <span class="spline">ne</span>tzwerk
+ </p>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="title">
+ $:content.headline
+ </div>
+
+ <div id="content">
+ $:content
+ </div>
+
+ <div id="footer">
+ <hr>
+
+ Any questions? Write us an e-mail to:
+ <a href="mailto:mailman at spline dot inf dot fu-berlin dot de">
+ mailman at spline dot inf dot fu-berlin dot de
+ </a>
+
+ <table width="100%" border="0">
+ <tr>
+ <td style="width: 33%; text-align: left;"><img src="/static/img/mailman.jpg" alt="Delivered by Mailman" border=0><br>version 2.1.11</td>
+ <td style="width: 34%; text-align: center;"><img src="/static/img/PythonPowered.png" alt="Python Powered" border=0></a></td>
+ <td style="width: 33%; text-align: right;"><img src="/static/img/gnu-head-tiny.jpg" alt="GNU's Not Unix" border=0></a></td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
diff --git a/templates/new.html b/templates/new.html
new file mode 100644
index 0000000..1bea143
--- /dev/null
+++ b/templates/new.html
@@ -0,0 +1,67 @@
+$def with (form, user)
+
+$var title: Mailinglisten
+$var headline:
+ Create new mailing list
+
+<div class="create">
+ <div class="header">
+ <b>The rules</b>
+ </div>
+
+ <ul>
+ <li>
+ <b>Do not play with mailing list creation.</b>
+ <br />
+ Please create only those lists you really need.
+ We have to delete unused lists manually.
+ </li>
+
+ <li>
+ <b>No spamming!</b>
+ <br />
+ Never subscribe people without their explicit permission.
+ </li>
+
+ <li>
+ <b>&quot;<i>fu-berlin.de</i>&quot; E-mail address</b>
+ <br />
+ <b>You</b> need an E-mail account at Freie Universitaet Berlin to <b>create</b> a mailing list.<br>(additional administrators and list members may have any E-Mail address)
+ </li>
+
+ <li>
+ <b>List operation</b>
+ <br />
+ We reserve the right to reject or discontinue operation of any mailing list without giving reasons.
+ </li>
+
+ <li>
+ <b>Logging</b>
+ <br />
+ We record the creation of mailing lists. This includes time & date of creation, E-mail address, and your Internet address.
+ </li>
+ </ul>
+</div>
+
+<div class="create">
+ <div class="header">
+ <b>Create a mailing list</b>
+ </div>
+
+ <form name="main" method="post">
+ $:form.render()
+
+ <input type="submit" value="Create" class="submit" />
+ </form>
+</div>
+
+<div class="create" id="info">
+ <div class="header">
+ <b>Information</b>
+ </div>
+
+ The following information will be logged:<br />
+ <br />
+ Your internet address: <b>$user['ip']</b><br />
+ Your hostname: <b>$user['host']</b><br />
+</div>
diff --git a/templates/spam.html b/templates/spam.html
new file mode 100644
index 0000000..4396ef7
--- /dev/null
+++ b/templates/spam.html
@@ -0,0 +1,157 @@
+$var title: Mailinglisten
+$var headline:
+ spam, und was mensch dagegen machen kann<br />
+
+ <span class="small">als AdministratorIn einer Mailingliste bei
+ spline</spam>
+
+<div class="create">
+ Es gibt verschiedene Möglichkeiten, abhängig z.B. davon, ob die Liste komplett moderiert ist, oder nur Mitglieder posten dürfen.
+ <ul>
+ <li>
+ Zunächst bemühen wir uns bei spline, Spam erst gar nicht
+ anzunehmen.
+
+ <ul>
+ <li>
+ Da dies natürlich automatisiert passiert, ist das eine etwas
+ heikle Sache, da auf gar keinen Fall legitime Mail abgewiesen
+ werden soll.
+ </li>
+ <li>
+ Andersherum sehen wir immer wieder Spammer, die ihre Emails
+ darauf trainieren, am Spamfilter vorbei zu kommen.
+ </li>
+ <li>
+ Manchmal dauert es eine Weile, bis sich die Situation durch
+ verbesserte Filtermaßnahmen wieder normalisiert.
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ Trotzdem bleiben innerhalb des "Sicherheitsabstandes" nicht wenige
+ Spam-Mails.
+
+ <ul>
+ <li>
+ Mailman bietet Dir die Möglichkeit, basierend auf der
+ Spam-Kennzeichnung Mails wegzuwerfen oder zurückzuweisen.
+ </li>
+ <li> Schau dir im Admin-Interface mal
+ <ul>
+ <li>
+ "<b>Abo-Regeln und Adreßfilter...</b>"
+ <ul>
+ <li>
+ "<b>Spam-Filter</b>" an.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ Im oberen Bereich, der
+ Konfigurationsoption <b>header_filter_rules</b>, könntest du
+ folgende Zeilen eintragen,<br />
+ um Spam ab einem Wert von 5 auszusortieren (jede Zeile wird
+ separat verarbeitet):
+
+ <pre>
+ X-Spam-Status: Yes
+ X-Spam-Level: \+{5,}
+ </pre>
+ </li>
+
+ <li>
+ der "<code>Spam-Status: Yes</code>" wird ab einem Level von 5
+ gesetzt.
+ </li>
+
+ <li>
+ Wenn du den "Sicherheitsabstand" größer oder kleiner haben
+ willst, verwendest du nur die zweite Zeile, und erhöhst (oder
+ verringerst) die Zahl.
+
+ <ul>
+ <li>
+ Aber vorsicht, ich hatte schon legitime Mail mit einem
+ score von 3.6,<br />
+ und auch wenn sie nicht einfach verschwindet, sondern mit
+ einer Fehler-<br />
+ meldung zurück geht, wissen viele Absender nicht was sie
+ machen können.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ Insbesondere wenn die Liste nur für Mitglieder ist, gibt es noch
+ eine weitere Möglichkeit den Administrationsaufwand zu verringern:
+
+ <ul>
+ <li>
+ Mails von Nichtmitgliedern sofort verwerfen,
+ </li>
+
+ <li>
+ aber dem Admin eine Kopie schicken, der dann im Zweifel die
+ weggeworfene Nachricht erneut an die Liste schickt und damit
+ "legitimiert".
+ </li>
+
+ <li>
+ Anstatt am Web-Interface rumzuklicken muss man nur seine
+ Emails lesen/löschen (und kann da evtl. nochmal lokal
+ filtern).
+ </li>
+
+ <li>
+ Die Konfigurationsoptionen dafür finden sich unter
+ <ul>
+ <li>
+ "<b>Abo-Regeln und Adreßfilter...</b>"
+ <ul>
+ <li>
+ "<b>Absender-Filter</b>"
+ </li>
+ </ul>
+ </li>
+ </ul>
+
+ die Optionen heißen <b>generic_nonmember_action</b>
+ und <b>forward_auto_discards</b>.
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ Bei allen Mühen, etwas Spam wird immer bleiben. Bei weniger als 3
+ Mails/Tag lohnt es sich vielleicht, zu lernen wie man mit seinem
+ Mailprogramm die an die Benachrichtigungsmail angehängte Nachricht
+ zurückschickt, um die gehaltene Mail ohne Web-Interaktion direkt
+ zu löschen. Oder vielleicht kann Dein Mailprogramm die
+ Spam-Kennzeichnung im Mail-Kopf finden und die Mail in einen
+ besonderen Ordner verschieben, den Du nur alle 3 Tage anguckst?
+ Meistens sieht man ja auf den ersten Blick ob etwas spam
+ ist... Eine .procmailrc-Regel dafür wäre z.B.:
+
+ <pre>
+ # hinfort mit spam!
+ :0
+ * ^X-Spam-Level: \+\+\+\+\+\+*|^X-Spam-Level: * \*\*\*\*\*\**
+ $$MAILDIR/spam
+ </pre>
+ Die Regel greift ab einem Spam-Level von 5, was normalerweise
+ reicht. Die Variante mit den Sternen ist für Spam von anderswo,
+ spline macht nur +
+ </li>
+ </ul>
+
+ Viel Erfolg,<br />
+ Florian<br />
+ mailman AT spline
+</div>