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/conf/rspamd/dynmaps/forwardinghosts.php

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

forwardinghosts.php on main
Author Date Commit Line Code
Michael Kuron over 9 years ago a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
2
header('Content-Type: text/plain');
Open commit View diff
2 header('Content-Type: text/plain');
same change a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
3
ini_set('error_reporting', 0);
Open commit View diff
3 ini_set('error_reporting', 0);
same change a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
4
Open commit View diff
4
andryyy about 9 years ago d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
5
$redis = new Redis();
Open commit View diff
5 $redis = new Redis();
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
6
$redis->connect('redis-mailcow', 6379);
Open commit View diff
6 $redis->connect('redis-mailcow', 6379);
FreddleSpl0it over 1 year ago 89fb132

Enable password protection for Redis

Full commit hash
89fb1322c6f486a9883e6435a73537b13fbf3582
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
7
$redis->auth(getenv("REDISPASS"));
Open commit View diff
7 $redis->auth(getenv("REDISPASS"));
Michael Kuron over 9 years ago a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
8
Open commit View diff
8
andryyy about 9 years ago d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
9
function in_net($addr, $net) {
Open commit View diff
9 function in_net($addr, $net) {
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
10
  $net = explode('/', $net);
Open commit View diff
10 $net = explode('/', $net);
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
11
  if (count($net) > 1) {
Open commit View diff
11 if (count($net) > 1) {
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
12
    $mask = $net[1];
Open commit View diff
12 $mask = $net[1];
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
13
  }
Open commit View diff
13 }
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
14
  $net = inet_pton($net[0]);
Open commit View diff
14 $net = inet_pton($net[0]);
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
15
  $addr = inet_pton($addr);
Open commit View diff
15 $addr = inet_pton($addr);
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
16
  $length = strlen($net); // 4 for IPv4, 16 for IPv6
Open commit View diff
16 $length = strlen($net); // 4 for IPv4, 16 for IPv6
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
17
  if (strlen($net) != strlen($addr)) {
Open commit View diff
17 if (strlen($net) != strlen($addr)) {
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
18
    return false;
Open commit View diff
18 return false;
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
19
  }
Open commit View diff
19 }
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
20
  if (!isset($mask)) {
Open commit View diff
20 if (!isset($mask)) {
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
21
    $mask = $length * 8;
Open commit View diff
21 $mask = $length * 8;
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
22
  }
Open commit View diff
22 }
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
23
  $addr_bin = '';
Open commit View diff
23 $addr_bin = '';
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
24
  $net_bin = '';
Open commit View diff
24 $net_bin = '';
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
25
  for ($i = 0; $i < $length; ++$i) {
Open commit View diff
25 for ($i = 0; $i < $length; ++$i) {
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
26
    $addr_bin .= str_pad(decbin(ord(substr($addr, $i, $i+1))), 8, '0', STR_PAD_LEFT);
Open commit View diff
26 $addr_bin .= str_pad(decbin(ord(substr($addr, $i, $i+1))), 8, '0', STR_PAD_LEFT);
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
27
    $net_bin .= str_pad(decbin(ord(substr($net, $i, $i+1))), 8, '0', STR_PAD_LEFT);
Open commit View diff
27 $net_bin .= str_pad(decbin(ord(substr($net, $i, $i+1))), 8, '0', STR_PAD_LEFT);
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
28
  }
Open commit View diff
28 }
same change d64ed65

Add multimap and forced actions for forwarded_hosts, removed from settings

Full commit hash
d64ed65575e3a287a78ba7f976b96dd1006f7a9a
Author
andryyy <[email protected]>
Date
about 9 years ago
Selected line
29
  return substr($addr_bin, 0, $mask) == substr($net_bin, 0, $mask);
Open commit View diff
29 return substr($addr_bin, 0, $mask) == substr($net_bin, 0, $mask);
Michael Kuron over 9 years ago a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
30
}
Open commit View diff
30 }
same change a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
31
Open commit View diff
31
Michael Kuron almost 9 years ago a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
32
if (isset($_GET['host'])) {
Open commit View diff
32 if (isset($_GET['host'])) {
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
33
  try {
Open commit View diff
33 try {
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
34
    foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
Open commit View diff
34 foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
35
      if (in_net($_GET['host'], $host)) {
Open commit View diff
35 if (in_net($_GET['host'], $host)) {
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
36
        echo '200 PERMIT';
Open commit View diff
36 echo '200 PERMIT';
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
37
        exit;
Open commit View diff
37 exit;
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
38
      }
Open commit View diff
38 }
Michael Kuron over 9 years ago a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
39
    }
Open commit View diff
39 }
Michael Kuron almost 9 years ago a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
40
    echo '200 DUNNO';
Open commit View diff
40 echo '200 DUNNO';
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
41
  }
Open commit View diff
41 }
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
42
  catch (RedisException $e) {
Open commit View diff
42 catch (RedisException $e) {
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
43
    echo '200 DUNNO';
Open commit View diff
43 echo '200 DUNNO';
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
44
    exit;
Open commit View diff
44 exit;
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
45
  }
Open commit View diff
45 }
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
46
} else {
Open commit View diff
46 } else {
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
47
  try {
Open commit View diff
47 try {
André over 8 years ago 1e9bc49

[Rspamd] Echo dummy for fowardingshosts map; Use higher map reading interval;

Full commit hash
1e9bc49f2cbd6f4cd077701e279b30445b4370ff
Author
André <[email protected]>
Date
over 8 years ago
Selected line
48
    echo '240.240.240.240' . PHP_EOL;
Open commit View diff
48 echo '240.240.240.240' . PHP_EOL;
Michael Kuron almost 9 years ago a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
49
    foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
Open commit View diff
49 foreach ($redis->hGetAll('WHITELISTED_FWD_HOST') as $host => $source) {
André over 8 years ago 1e9bc49

[Rspamd] Echo dummy for fowardingshosts map; Use higher map reading interval;

Full commit hash
1e9bc49f2cbd6f4cd077701e279b30445b4370ff
Author
André <[email protected]>
Date
over 8 years ago
Selected line
50
      echo $host . PHP_EOL;
Open commit View diff
50 echo $host . PHP_EOL;
Michael Kuron almost 9 years ago a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
51
    }
Open commit View diff
51 }
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
52
  }
Open commit View diff
52 }
same change a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
53
  catch (RedisException $e) {
Open commit View diff
53 catch (RedisException $e) {
André over 8 years ago 1e9bc49

[Rspamd] Echo dummy for fowardingshosts map; Use higher map reading interval;

Full commit hash
1e9bc49f2cbd6f4cd077701e279b30445b4370ff
Author
André <[email protected]>
Date
over 8 years ago
Selected line
54
    echo '240.240.240.240' . PHP_EOL;
Open commit View diff
54 echo '240.240.240.240' . PHP_EOL;
Michael Kuron almost 9 years ago a4ccd78

rspamd: disable greylisting for forwarding hosts

Full commit hash
a4ccd780c6be369d5336b77d7d98bfee74e7cbd9
Author
Michael Kuron <[email protected]>
Date
almost 9 years ago
Selected line
55
    exit;
Open commit View diff
55 exit;
Michael Kuron over 9 years ago a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
56
  }
Open commit View diff
56 }
same change a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
57
}
Open commit View diff
57 }
same change a75d916

Forwarding hosts in postscreen

Full commit hash
a75d916b74a78f3d1f9a07eaf7920f113569bc9f
Author
Michael Kuron <[email protected]>
Date
over 9 years ago
Selected line
58
?>
Open commit View diff
58 ?>