Browse Source

Merge pull request #1 from gerrit1986/development

enhance PostTLS's installability and distributability
Hendrik Sünkler 7 years ago
parent
commit
b5ea26b152
4 changed files with 56 additions and 10 deletions
  1. 5
    1
      .gitignore
  2. 9
    0
      MANIFEST.in
  3. 10
    9
      README.md
  4. 32
    0
      setup.py

+ 5
- 1
.gitignore View File

@@ -1,6 +1,6 @@
1 1
 # Python binaries
2 2
 *.py[cod]
3
- 
3
+
4 4
 # Temporary GNU Emacs files
5 5
 *~
6 6
 [#]*[#]
@@ -17,3 +17,7 @@ docs/_build
17 17
 
18 18
 # Database
19 19
 posttls/config/db.sqlite3
20
+
21
+# Source Distribution and respective egg
22
+dist/
23
+posttls.egg-info/

+ 9
- 0
MANIFEST.in View File

@@ -0,0 +1,9 @@
1
+include LICENSE
2
+include README.md
3
+include requirements.txt
4
+recursive-include posttls/core/static/css *
5
+recursive-include posttls/core/static/vendor *
6
+recursive-include posttls/core/static/vendor/bootstrap/css *
7
+recursive-include posttls/core/static/vendor/bootstrap/fonts *
8
+recursive-include posttls/core/static/vendor/bootstrap/js *
9
+recursive-include posttls/core/templates/core *

+ 10
- 9
README.md View File

@@ -11,7 +11,7 @@ The code in this repository is licensed under version 3 of the GNU Affero Genera
11 11
 Requirements
12 12
 ------------
13 13
 
14
-Please be aware that PostTLS right now is in **early stage** and there are quite a few things to prepare on the server to use the software. You should be familiar with Linux system administration and you should know how to run a python program in production. In the following you will find a list of requirements - but this is **not a step-by-step guide to meet these requirements**! Of course, documentation and automation of the installation procedure will be enhanced in the future if there is demand. 
14
+Please be aware that PostTLS right now is in **early stage** and there are quite a few things to prepare on the server to use the software. You should be familiar with Linux system administration and you should know how to run a python program in production. In the following you will find a list of requirements - but this is **not a step-by-step guide to meet these requirements**! Of course, documentation and automation of the installation procedure will be enhanced in the future if there is demand.
15 15
 
16 16
 **USE THIS SOFTWARE AT YOUR OWN RISK! AND MAKE SURE YOU UNDERSTAND WHAT IT DOES!**
17 17
 
@@ -20,15 +20,15 @@ Make sure to meet the following requirements:
20 20
 - Python 3
21 21
 - Virtualenv and virtualenvwrapper
22 22
 - Two Postfix instances. See [Managing multiple Postfix instances on a single host](http://www.postfix.org/MULTI_INSTANCE_README.html) to find out more about multiple instance support of Postfix.
23
-  - First instance: Postfix option `smtp_tls_security_level` is set to `encrypt` and implements mandatory TLS for all domains. 
23
+  - First instance: Postfix option `smtp_tls_security_level` is set to `encrypt` and implements mandatory TLS for all domains.
24 24
   - Second instance: Postfix option `smtp_tls_security_level` is set to `may` and implements opportunistic TLS.
25 25
 - PostTLS calls some Postfix commands, which should be executable via sudo without password. So add something like this to /etc/sudoers using `sudo visudo`:
26 26
 
27 27
 ```bash
28
-# User hendrik can use apps needed for PostTLS
29
-hendrik ALL = NOPASSWD: /usr/bin/mailq
30
-hendrik ALL = NOPASSWD: /usr/sbin/postcat
31
-hendrik ALL = NOPASSWD: /usr/sbin/postsuper
28
+# User 'developer' can use apps needed for PostTLS
29
+developer ALL = NOPASSWD: /usr/bin/mailq
30
+developer ALL = NOPASSWD: /usr/sbin/postcat
31
+developer ALL = NOPASSWD: /usr/sbin/postsuper
32 32
 ```
33 33
 
34 34
 Installation
@@ -53,13 +53,14 @@ Configuration of PostTLS is done via environment variables. You can use a bash s
53 53
 ```bash
54 54
 # Django configuration
55 55
 export POSTTLS_SECRET_KEY="verysecretkey"
56
-export POSTTLS_STATIC_ROOT_DIR="/home/hendrik/apps/posttls/static/"
57
-export POSTTLS_MEDIA_ROOT_DIR="/home/hendrik/apps/posttls/media/"
56
+export POSTTLS_STATIC_ROOT_DIR="/home/developer/apps/posttls/static/"
57
+export POSTTLS_MEDIA_ROOT_DIR="/home/developer/apps/posttls/media/"
58 58
 
59 59
 # Set this to 'production' in production environment (see Django settings file)
60 60
 export POSTTLS_ENVIRONMENT_TYPE="development"
61 61
 
62 62
 # PostTLS settings
63
+export POSTTLS_NOTIFICATION_SYSADMIN_MAIL_ADDRESS="admin@localhost"
63 64
 export POSTTLS_NOTIFICATION_SENDER="postmaster@domain.com (Postmaster)"
64 65
 export POSTTLS_NOTIFICATION_SMTP_HOST="localhost"
65 66
 
@@ -88,4 +89,4 @@ Automation
88 89
 
89 90
 You can configure a cron job to process the queue once every minute. To prevent overlapping of cron jobs, use the [flock](http://linux.die.net/man/1/flock) command:
90 91
 
91
-    */1 * * * * . /home/hendrik/apps/posttls/env.sh && /usr/bin/flock -w 0 /home/hendrik/apps/posttls/cron.lock /home/hendrik/.virtualenvs/posttls/bin/python3 /home/hendrik/apps/posttls/posttls/posttls/manage.py process_queue >/dev/null 2>&1
92
+    */1 * * * * . /home/developer/apps/posttls/env.sh && /usr/bin/flock -w 0 /home/developer/apps/posttls/cron.lock /home/developer/.virtualenvs/posttls/bin/python3 /home/developer/apps/posttls/posttls/posttls/manage.py process_queue >/dev/null 2>&1

+ 32
- 0
setup.py View File

@@ -0,0 +1,32 @@
1
+import os
2
+from setuptools import find_packages, setup
3
+
4
+with open(os.path.join(os.path.dirname(__file__), "README.md")) as readme:
5
+    README = readme.read()
6
+
7
+# allow setup.py to be run from any path
8
+os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
9
+
10
+setup(
11
+    name="posttls",
12
+    version="1.0",
13
+    packages=find_packages(),
14
+    include_package_data=True,
15
+    license="AGPLv3",
16
+    description="Postfix's Transport Encryption under Control of the User",
17
+    long_description=README,
18
+    url="https://posttls.com/",
19
+    author="Hendrik Suenkler",
20
+    author_email="hendrik@posttls.com",
21
+    classifiers=[
22
+        "Environment :: Web Environment",
23
+        "Framework :: Django",
24
+        "Framework :: Django :: 1.8",
25
+        "Intended Audience :: Developers",
26
+        "License :: OSI Approved :: AGPLv3",
27
+        "Operating System :: OS Independent",
28
+        "Programming Language :: Python",
29
+        "Topic :: Internet :: WWW/HTTP",
30
+        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
31
+    ],
32
+)

Loading…
Cancel
Save