Browse Source

abstract username, harmonize quotes, extend gitignore

Gerrit Holz 7 years ago
parent
commit
b5c4e431f9
3 changed files with 30 additions and 26 deletions
  1. 5
    1
      .gitignore
  2. 9
    9
      README.md
  3. 16
    16
      setup.py

+ 5
- 1
.gitignore View File

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

+ 9
- 9
README.md View File

11
 Requirements
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
 **USE THIS SOFTWARE AT YOUR OWN RISK! AND MAKE SURE YOU UNDERSTAND WHAT IT DOES!**
16
 **USE THIS SOFTWARE AT YOUR OWN RISK! AND MAKE SURE YOU UNDERSTAND WHAT IT DOES!**
17
 
17
 
20
 - Python 3
20
 - Python 3
21
 - Virtualenv and virtualenvwrapper
21
 - Virtualenv and virtualenvwrapper
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.
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
   - Second instance: Postfix option `smtp_tls_security_level` is set to `may` and implements opportunistic TLS.
24
   - Second instance: Postfix option `smtp_tls_security_level` is set to `may` and implements opportunistic TLS.
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`:
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
 ```bash
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
 Installation
34
 Installation
53
 ```bash
53
 ```bash
54
 # Django configuration
54
 # Django configuration
55
 export POSTTLS_SECRET_KEY="verysecretkey"
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
 # Set this to 'production' in production environment (see Django settings file)
59
 # Set this to 'production' in production environment (see Django settings file)
60
 export POSTTLS_ENVIRONMENT_TYPE="development"
60
 export POSTTLS_ENVIRONMENT_TYPE="development"
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
 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:
91
 
91
 
92
-    */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

+ 16
- 16
setup.py View File

1
 import os
1
 import os
2
 from setuptools import find_packages, setup
2
 from setuptools import find_packages, setup
3
 
3
 
4
-with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
4
+with open(os.path.join(os.path.dirname(__file__), "README.md")) as readme:
5
     README = readme.read()
5
     README = readme.read()
6
 
6
 
7
 # allow setup.py to be run from any path
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)))
8
 os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
9
 
9
 
10
 setup(
10
 setup(
11
-    name='posttls',
12
-    version='1.0',
11
+    name="posttls",
12
+    version="1.0",
13
     packages=find_packages(),
13
     packages=find_packages(),
14
     include_package_data=True,
14
     include_package_data=True,
15
-    license='AGPLv3',
15
+    license="AGPLv3",
16
     description="Postfix' Transport Encryption under Control of the User",
16
     description="Postfix' Transport Encryption under Control of the User",
17
     long_description=README,
17
     long_description=README,
18
-    url='https://posttls.com/',
19
-    author='Hendrik Suenkler',
20
-    author_email='hendrik@posttls.com',
18
+    url="https://posttls.com/",
19
+    author="Hendrik Suenkler",
20
+    author_email="hendrik@posttls.com",
21
     classifiers=[
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',
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
     ],
31
     ],
32
 )
32
 )

Loading…
Cancel
Save