diff options
| -rw-r--r-- | .gitignore | 122 | ||||
| -rw-r--r-- | setup.py | 31 | ||||
| -rw-r--r-- | src/pgpmailman/commands/eml_key.py | 16 | ||||
| -rw-r--r-- | src/pgpmailman/database/__init__.py | 0 | ||||
| -rw-r--r-- | src/pgpmailman/pgp/__init__.py | 0 | ||||
| -rw-r--r-- | src/pgpmailman/plugin.py | 24 | ||||
| -rw-r--r-- | src/pgpmailman/rest/__init__.py | 0 | ||||
| -rw-r--r-- | src/pgpmailman/rest/lists.py | 0 | ||||
| -rw-r--r-- | src/pgpmailman/rest/root.py | 14 | ||||
| -rw-r--r-- | src/pgpmailman/rest/users.py | 0 | ||||
| -rw-r--r-- | src/pgpmailman/runners/incoming.py | 9 | ||||
| -rw-r--r-- | src/pgpmailman/runners/outgoing.py | 9 | ||||
| -rw-r--r-- | src/pgpmailman/styles/announce.py | 10 | ||||
| -rw-r--r-- | src/pgpmailman/styles/discussion.py | 10 |
14 files changed, 245 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..05722ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,122 @@ +# Created by .ignore support plugin (hsz.mobi) +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/ + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..65b754b --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +from setuptools import setup, find_packages + +setup( + name='pgpmailman', + version='0.1', + description='A PGP plugin for the GNU Mailman mailing list manager', + long_description="""\ +A plugin for GNU Mailman that adds encrypted mailing lists via PGP/MIME. + """, + author='Jan Jancar', + author_email='johny@neuromancer.sk', + license='', + classifiers=[ + 'Development Status :: 1 - Planning', + 'Intended Audience :: System Administrators', + 'Operating System :: POSIX', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Topic :: Communications :: Email :: Mailing List Servers', + ], + keywords='email pgp', + packages=find_packages('src'), + package_dir={'': 'src'}, + install_requires=[ + 'mailman>=3.1.0', + 'pgp', + 'atpublic', + 'zope.interface', + ] +) diff --git a/src/pgpmailman/commands/eml_key.py b/src/pgpmailman/commands/eml_key.py new file mode 100644 index 0000000..6cb8469 --- /dev/null +++ b/src/pgpmailman/commands/eml_key.py @@ -0,0 +1,16 @@ +from mailman.interfaces.command import IEmailCommand +from public import public +from zope.interface import implementer + + +@public +@implementer(IEmailCommand) +class Key: + name = 'key' + argument_description = '<change|revoke|sign>' + short_description = '' + description = '' + + def process(mlist, msg, msgdata, arguments, results): + """See `IEmailCommand`.""" + pass diff --git a/src/pgpmailman/database/__init__.py b/src/pgpmailman/database/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/pgpmailman/database/__init__.py diff --git a/src/pgpmailman/pgp/__init__.py b/src/pgpmailman/pgp/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/pgpmailman/pgp/__init__.py diff --git a/src/pgpmailman/plugin.py b/src/pgpmailman/plugin.py new file mode 100644 index 0000000..0608bd0 --- /dev/null +++ b/src/pgpmailman/plugin.py @@ -0,0 +1,24 @@ +from mailman.interfaces.plugin import IPlugin +from public import public +from zope.interface import implementer + +from pgpmailman.rest.root import RESTRoot + + +@public +@implementer(IPlugin) +class PGPMailman: + + name = 'pgpmailman' + + def __init__(self): + self._rest = RESTRoot() + + def pre_hook(self): + pass + + def post_hook(self): + pass + + def rest_object(self): + return self._rest diff --git a/src/pgpmailman/rest/__init__.py b/src/pgpmailman/rest/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/pgpmailman/rest/__init__.py diff --git a/src/pgpmailman/rest/lists.py b/src/pgpmailman/rest/lists.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/pgpmailman/rest/lists.py diff --git a/src/pgpmailman/rest/root.py b/src/pgpmailman/rest/root.py new file mode 100644 index 0000000..69565d8 --- /dev/null +++ b/src/pgpmailman/rest/root.py @@ -0,0 +1,14 @@ +from mailman.rest.helpers import child +from public import public + + +@public +class RESTRoot: + + @child() + def lists(self, context, segments): + pass + + @child() + def users(self, context, segments): + pass
\ No newline at end of file diff --git a/src/pgpmailman/rest/users.py b/src/pgpmailman/rest/users.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/pgpmailman/rest/users.py diff --git a/src/pgpmailman/runners/incoming.py b/src/pgpmailman/runners/incoming.py new file mode 100644 index 0000000..6d1aae5 --- /dev/null +++ b/src/pgpmailman/runners/incoming.py @@ -0,0 +1,9 @@ +from mailman.core.runner import Runner +from public import public + + +@public +class Incoming(Runner): + def _dispose(self, mlist, msg, msgdata): + """See `IRunner`.""" + pass diff --git a/src/pgpmailman/runners/outgoing.py b/src/pgpmailman/runners/outgoing.py new file mode 100644 index 0000000..6b23fe2 --- /dev/null +++ b/src/pgpmailman/runners/outgoing.py @@ -0,0 +1,9 @@ +from mailman.core.runner import Runner +from public import public + + +@public +class Outgoing(Runner): + def _dispose(self, mlist, msg, msgdata): + """See `IRunner`.""" + pass diff --git a/src/pgpmailman/styles/announce.py b/src/pgpmailman/styles/announce.py new file mode 100644 index 0000000..dc07c57 --- /dev/null +++ b/src/pgpmailman/styles/announce.py @@ -0,0 +1,10 @@ +from mailman.interfaces.styles import IStyle +from public import public +from zope.interface import implementer + + +@public +@implementer(IStyle) +class Announce: + def apply(self, mailing_list): + """See `IStyle`.""" diff --git a/src/pgpmailman/styles/discussion.py b/src/pgpmailman/styles/discussion.py new file mode 100644 index 0000000..310b7a1 --- /dev/null +++ b/src/pgpmailman/styles/discussion.py @@ -0,0 +1,10 @@ +from mailman.interfaces.styles import IStyle +from public import public +from zope.interface import implementer + + +@public +@implementer(IStyle) +class Discussion: + def apply(self, mailing_list): + """See `IStyle`.""" |
