NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
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/dovecot/sa-rules.sh

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

sa-rules.sh on main
Author Date Commit Line Code
André almost 8 years ago 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
1
#!/bin/bash
Open commit View diff
1 #!/bin/bash
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
2
Open commit View diff
2
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
3
# Create temp directories
Open commit View diff
3 # Create temp directories
André almost 8 years ago 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
4
[[ ! -d /tmp/sa-rules-heinlein ]] && mkdir -p /tmp/sa-rules-heinlein
Open commit View diff
4 [[ ! -d /tmp/sa-rules-heinlein ]] && mkdir -p /tmp/sa-rules-heinlein
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
5
Open commit View diff
5
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
6
# Hash current SA rules
Open commit View diff
6 # Hash current SA rules
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
7
if [[ ! -f /etc/rspamd/custom/sa-rules ]]; then
Open commit View diff
7 if [[ ! -f /etc/rspamd/custom/sa-rules ]]; then
André almost 8 years ago 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
8
  HASH_SA_RULES=0
Open commit View diff
8 HASH_SA_RULES=0
same change 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
9
else
Open commit View diff
9 else
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
10
  HASH_SA_RULES=$(cat /etc/rspamd/custom/sa-rules | md5sum | cut -d' ' -f1)
Open commit View diff
10 HASH_SA_RULES=$(cat /etc/rspamd/custom/sa-rules | md5sum | cut -d' ' -f1)
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
11
fi
Open commit View diff
11 fi
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
12
Open commit View diff
12
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
13
# Deploy
Open commit View diff
13 # Deploy
Alyx over 1 year ago 36db686

Reduce sa rules download retry limit to 5 (#6225)

Full commit hash
36db68677ca41f68f7117f8d1c6abf53af5adcbe
Author
Alyx <[email protected]>
Date
over 1 year ago
Selected line
14
if curl --connect-timeout 15 --retry 5 --max-time 30 https://www.spamassassin.heinlein-support.de/$(dig txt 1.4.3.spamassassin.heinlein-support.de +short | tr -d '"' | tr -dc '0-9').tar.gz --output /tmp/sa-rules-heinlein.tar.gz; then
Open commit View diff
14 if curl --connect-timeout 15 --retry 5 --max-time 30 https://www.spamassassin.heinlein-support.de/$(dig txt 1.4.3.spamassassin.heinlein-support.de +short | tr -d '"' | tr -dc '0-9').tar.gz --output /tmp/sa-rules-heinlein.tar.gz; then
Niklas Meyer almost 2 years ago cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
15
  if gzip -t /tmp/sa-rules-heinlein.tar.gz; then
Open commit View diff
15 if gzip -t /tmp/sa-rules-heinlein.tar.gz; then
same change cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
16
    tar xfvz /tmp/sa-rules-heinlein.tar.gz -C /tmp/sa-rules-heinlein
Open commit View diff
16 tar xfvz /tmp/sa-rules-heinlein.tar.gz -C /tmp/sa-rules-heinlein
same change cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
17
    cat /tmp/sa-rules-heinlein/*cf > /etc/rspamd/custom/sa-rules
Open commit View diff
17 cat /tmp/sa-rules-heinlein/*cf > /etc/rspamd/custom/sa-rules
same change cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
18
  fi
Open commit View diff
18 fi
same change cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
19
else
Open commit View diff
19 else
same change cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
20
  echo "Failed to download SA rules. Exiting."
Open commit View diff
20 echo "Failed to download SA rules. Exiting."
same change cb50d08

dovecot: added timeout option when sa-rules cannot be downloaded (#6025)

Full commit hash
cb50d08605875e4f1862d6309e3ff9145423c9ad
Author
Niklas Meyer <[email protected]>
Date
almost 2 years ago
Selected line
21
  exit 0 # Must be 0 otherwise dovecot would not start at all
Open commit View diff
21 exit 0 # Must be 0 otherwise dovecot would not start at all
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
22
fi
Open commit View diff
22 fi
André almost 8 years ago 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
23
Open commit View diff
23
andryyy over 6 years ago 2f3f70d

[Dovecot] sa-rules: escape non-regex in regex

Full commit hash
2f3f70dd004e94ac80f5ea1704113d90d7f922a5
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
24
sed -i -e 's/\([^\\]\)\$\([^\/]\)/\1\\$\2/g' /etc/rspamd/custom/sa-rules
Open commit View diff
24 sed -i -e 's/\([^\\]\)\$\([^\/]\)/\1\\$\2/g' /etc/rspamd/custom/sa-rules
same change 2f3f70d

[Dovecot] sa-rules: escape non-regex in regex

Full commit hash
2f3f70dd004e94ac80f5ea1704113d90d7f922a5
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
25
Open commit View diff
25
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
26
if [[ "$(cat /etc/rspamd/custom/sa-rules | md5sum | cut -d' ' -f1)" != "${HASH_SA_RULES}" ]]; then
Open commit View diff
26 if [[ "$(cat /etc/rspamd/custom/sa-rules | md5sum | cut -d' ' -f1)" != "${HASH_SA_RULES}" ]]; then
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
27
  CONTAINER_NAME=rspamd-mailcow
Open commit View diff
27 CONTAINER_NAME=rspamd-mailcow
DerLinkman almost 2 years ago b56291f

adapt scheme to affected curl containers (dirty way... but workaround)

Full commit hash
b56291f62b07df92ebff1b119379c0007bfe9d47
Author
DerLinkman <[email protected]>
Date
almost 2 years ago
Selected line
28
  CONTAINER_ID=$(curl --silent --insecure https://dockerapi.${COMPOSE_PROJECT_NAME}_mailcow-network/containers/json | \
Open commit View diff
28 CONTAINER_ID=$(curl --silent --insecure https://dockerapi.${COMPOSE_PROJECT_NAME}_mailcow-network/containers/json | \
andryyy about 6 years ago 09ad2b1

[Dovecot] Filter by compose project name, create trusted map for SOGo IP, run DNS check before starting service

Full commit hash
09ad2b13148acd45f680685242c9ec4f6f9242b2
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
29
    jq -r ".[] | {name: .Config.Labels[\"com.docker.compose.service\"], project: .Config.Labels[\"com.docker.compose.project\"], id: .Id}" | \
Open commit View diff
29 jq -r ".[] | {name: .Config.Labels[\"com.docker.compose.service\"], project: .Config.Labels[\"com.docker.compose.project\"], id: .Id}" | \
andryyy almost 6 years ago 97ee4b7

[Various] Always use lowercase for COMPOSE_PROJECT_NAME

Full commit hash
97ee4b70cab740bf3c58b6977ce13909ee2a6290
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
30
    jq -rc "select( .name | tostring | contains(\"${CONTAINER_NAME}\")) | select( .project | tostring | contains(\"${COMPOSE_PROJECT_NAME,,}\")) | .id")
Open commit View diff
30 jq -rc "select( .name | tostring | contains(\"${CONTAINER_NAME}\")) | select( .project | tostring | contains(\"${COMPOSE_PROJECT_NAME,,}\")) | .id")
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
31
  if [[ ! -z ${CONTAINER_ID} ]]; then
Open commit View diff
31 if [[ ! -z ${CONTAINER_ID} ]]; then
DerLinkman almost 2 years ago b56291f

adapt scheme to affected curl containers (dirty way... but workaround)

Full commit hash
b56291f62b07df92ebff1b119379c0007bfe9d47
Author
DerLinkman <[email protected]>
Date
almost 2 years ago
Selected line
32
    curl --silent --insecure -XPOST --connect-timeout 15 --max-time 120 https://dockerapi.${COMPOSE_PROJECT_NAME}_mailcow-network/containers/${CONTAINER_ID}/restart
Open commit View diff
32 curl --silent --insecure -XPOST --connect-timeout 15 --max-time 120 https://dockerapi.${COMPOSE_PROJECT_NAME}_mailcow-network/containers/${CONTAINER_ID}/restart
André almost 8 years ago 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
33
  fi
Open commit View diff
33 fi
same change 0fb43f4

[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)

Full commit hash
0fb43f49161554dbe0e66cd6170ad00166efc8b3
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
34
fi
Open commit View diff
34 fi
andryyy almost 7 years ago f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
35
Open commit View diff
35
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
36
# Cleanup
Open commit View diff
36 # Cleanup
same change f35efbf

[Dovecot] Add new SA rules

Full commit hash
f35efbf39c1fbb0d5a1049c9ec90020448609104
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
37
rm -rf /tmp/sa-rules-heinlein /tmp/sa-rules-heinlein.tar.gz
Open commit View diff
37 rm -rf /tmp/sa-rules-heinlein /tmp/sa-rules-heinlein.tar.gz