public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/Dockerfiles/postfix-tlspol/postfix-tlspol.sh
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
#!/bin/bash
3
LOGLVL=info
5
if [ ${DEV_MODE} != "n" ]; then
6
echo -e "\e[31mEnabling debug mode\e[0m"
7
set -x
8
LOGLVL=debug
9
fi
11
[[ ! -d /etc/postfix-tlspol ]] && mkdir -p /etc/postfix-tlspol
12
[[ ! -d /var/lib/postfix-tlspol ]] && mkdir -p /var/lib/postfix-tlspol
14
until dig +short mailcow.email > /dev/null; do
15
echo "Waiting for DNS..."
16
sleep 1
17
done
19
# Do not attempt to write to slave
20
if [[ ! -z ${REDIS_SLAVEOF_IP} ]]; then
21
export REDIS_CMDLINE="redis-cli -h ${REDIS_SLAVEOF_IP} -p ${REDIS_SLAVEOF_PORT} -a ${REDISPASS} --no-auth-warning"
22
else
23
export REDIS_CMDLINE="redis-cli -h redis -p 6379 -a ${REDISPASS} --no-auth-warning"
24
fi
26
until [[ $(${REDIS_CMDLINE} PING) == "PONG" ]]; do
27
echo "Waiting for Redis..."
28
sleep 2
29
done
31
echo "Waiting for Postfix..."
32
until ping postfix -c1 > /dev/null; do
33
sleep 1
34
done
35
echo "Postfix OK"
37
cat <<EOF > /etc/postfix-tlspol/config.yaml
38
server:
39
address: 0.0.0.0:8642
41
log-level: ${LOGLVL}
43
prefetch: true
45
cache-file: /var/lib/postfix-tlspol/cache.db
47
dns:
48
# must support DNSSEC
49
address: 127.0.0.11:53
50
EOF
52
/usr/local/bin/postfix-tlspol -config /etc/postfix-tlspol/config.yaml