|
@@ -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
|