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

helper-scripts/reset-learns.sh

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

reset-learns.sh on main
Author Date Commit Line Code
Harald Glatt about 7 years ago 7dc0a05

Update all helper scripts to '/usr/bin/env bash' shebang

Full commit hash
7dc0a05a71d958918644339649ac6874c821eacb
Author
Harald Glatt <[email protected]>
Date
about 7 years ago
Selected line
1
#!/usr/bin/env bash
Open commit View diff
1 #!/usr/bin/env bash
André almost 8 years ago 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
2
Open commit View diff
2
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
3
read -r -p "Are you sure you want to reset learned hashes from Rspamd (fuzzy, bayes, neural)? [y/N] " response
Open commit View diff
3 read -r -p "Are you sure you want to reset learned hashes from Rspamd (fuzzy, bayes, neural)? [y/N] " response
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
4
response=${response,,}    # tolower
Open commit View diff
4 response=${response,,} # tolower
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
5
if [[ "$response" =~ ^(yes|y)$ ]]; then
Open commit View diff
5 if [[ "$response" =~ ^(yes|y)$ ]]; then
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
6
  echo "Working, please wait..."
Open commit View diff
6 echo "Working, please wait..."
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
7
  REDIS_ID=$(docker ps -qf name=redis-mailcow)
Open commit View diff
7 REDIS_ID=$(docker ps -qf name=redis-mailcow)
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
8
  RSPAMD_ID=$(docker ps -qf name=rspamd-mailcow)
Open commit View diff
8 RSPAMD_ID=$(docker ps -qf name=rspamd-mailcow)
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
9
Open commit View diff
9
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
10
  if [ -z ${REDIS_ID} ] || [ -z ${RSPAMD_ID} ]; then
Open commit View diff
10 if [ -z ${REDIS_ID} ] || [ -z ${RSPAMD_ID} ]; then
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
11
    echo "Cannot determine Redis or Rspamd container ID"
Open commit View diff
11 echo "Cannot determine Redis or Rspamd container ID"
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
12
    exit 1
Open commit View diff
12 exit 1
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
13
  else
Open commit View diff
13 else
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
14
    echo "Stopping Rspamd container"
Open commit View diff
14 echo "Stopping Rspamd container"
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
15
    docker stop ${RSPAMD_ID}
Open commit View diff
15 docker stop ${RSPAMD_ID}
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
16
    echo "LUA will return nil when it succeeds or print a warning/error when it fails."
Open commit View diff
16 echo "LUA will return nil when it succeeds or print a warning/error when it fails."
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
17
    echo "Deleting all RS* keys - if any"
Open commit View diff
17 echo "Deleting all RS* keys - if any"
FreddleSpl0it over 1 year ago 6831f94

[Redis] redis-cli suppress auth warning

Full commit hash
6831f94fdb209fb4a558f5f81fb7db340c856bd2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
18
    docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'RS*'
Open commit View diff
18 docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'RS*'
André almost 8 years ago 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
19
    echo "Deleting all BAYES* keys - if any"
Open commit View diff
19 echo "Deleting all BAYES* keys - if any"
FreddleSpl0it over 1 year ago 6831f94

[Redis] redis-cli suppress auth warning

Full commit hash
6831f94fdb209fb4a558f5f81fb7db340c856bd2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
20
    docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'BAYES*'
Open commit View diff
20 docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'BAYES*'
André almost 8 years ago 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
21
    echo "Deleting all learned* keys - if any"
Open commit View diff
21 echo "Deleting all learned* keys - if any"
FreddleSpl0it over 1 year ago 6831f94

[Redis] redis-cli suppress auth warning

Full commit hash
6831f94fdb209fb4a558f5f81fb7db340c856bd2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
22
    docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'learned*'
Open commit View diff
22 docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'learned*'
André almost 8 years ago 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
23
    echo "Deleting all fuzzy* keys - if any"
Open commit View diff
23 echo "Deleting all fuzzy* keys - if any"
FreddleSpl0it over 1 year ago 6831f94

[Redis] redis-cli suppress auth warning

Full commit hash
6831f94fdb209fb4a558f5f81fb7db340c856bd2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
24
    docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'fuzzy*'
Open commit View diff
24 docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'fuzzy*'
André almost 8 years ago 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
25
    echo "Deleting all tRFANN* keys - if any"
Open commit View diff
25 echo "Deleting all tRFANN* keys - if any"
FreddleSpl0it over 1 year ago 6831f94

[Redis] redis-cli suppress auth warning

Full commit hash
6831f94fdb209fb4a558f5f81fb7db340c856bd2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
26
    docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'tRFANN*'
Open commit View diff
26 docker exec -it ${REDIS_ID} redis-cli -a ${REDISPASS} --no-auth-warning EVAL "for _,k in ipairs(redis.call('keys', ARGV[1])) do redis.call('del', k) end" 0 'tRFANN*'
André almost 8 years ago 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
27
    echo "Starting Rspamd container"
Open commit View diff
27 echo "Starting Rspamd container"
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
28
    docker start ${RSPAMD_ID}
Open commit View diff
28 docker start ${RSPAMD_ID}
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
29
  fi
Open commit View diff
29 fi
same change 681a51b

[Helper] Add script to reset all learns in Rspamd

Full commit hash
681a51b3ce4af44b8e9cecbe21f5e4279c67e600
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
30
fi
Open commit View diff
30 fi