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/meta_exporter/pipe_rl.php

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

pipe_rl.php on main
Author Date Commit Line Code
andryyy over 7 years ago ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
2
// File size is limited by Nginx site to 10M
Open commit View diff
2 // File size is limited by Nginx site to 10M
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
3
// To speed things up, we do not include prerequisites
Open commit View diff
3 // To speed things up, we do not include prerequisites
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
4
header('Content-Type: text/plain');
Open commit View diff
4 header('Content-Type: text/plain');
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
5
require_once "vars.inc.php";
Open commit View diff
5 require_once "vars.inc.php";
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
6
// Do not show errors, we log to using error_log
Open commit View diff
6 // Do not show errors, we log to using error_log
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
7
ini_set('error_reporting', 0);
Open commit View diff
7 ini_set('error_reporting', 0);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
8
// Init Redis
Open commit View diff
8 // Init Redis
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
9
$redis = new Redis();
Open commit View diff
9 $redis = new Redis();
andryyy over 6 years ago ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
10
try {
Open commit View diff
10 try {
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
11
  if (!empty(getenv('REDIS_SLAVEOF_IP'))) {
Open commit View diff
11 if (!empty(getenv('REDIS_SLAVEOF_IP'))) {
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
12
    $redis->connect(getenv('REDIS_SLAVEOF_IP'), getenv('REDIS_SLAVEOF_PORT'));
Open commit View diff
12 $redis->connect(getenv('REDIS_SLAVEOF_IP'), getenv('REDIS_SLAVEOF_PORT'));
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
13
  }
Open commit View diff
13 }
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
14
  else {
Open commit View diff
14 else {
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
15
    $redis->connect('redis-mailcow', 6379);
Open commit View diff
15 $redis->connect('redis-mailcow', 6379);
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
16
  }
Open commit View diff
16 }
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
17
  $redis->auth(getenv("REDISPASS"));
Open commit View diff
17 $redis->auth(getenv("REDISPASS"));
andryyy over 6 years ago ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
18
}
Open commit View diff
18 }
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
19
catch (Exception $e) {
Open commit View diff
19 catch (Exception $e) {
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
20
  exit;
Open commit View diff
20 exit;
same change ad55dd8

[Rspamd] Use redis master for RL operations in pipe_rl

Full commit hash
ad55dd8f059953c07e5380c9bafcc073d6adb6cc
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
21
}
Open commit View diff
21 }
andryyy over 7 years ago ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
22
Open commit View diff
22
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
23
$raw_data_content = file_get_contents('php://input');
Open commit View diff
23 $raw_data_content = file_get_contents('php://input');
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
24
$raw_data_decoded = json_decode($raw_data_content, true);
Open commit View diff
24 $raw_data_decoded = json_decode($raw_data_content, true);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
25
Open commit View diff
25
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
26
$data['time'] = time();
Open commit View diff
26 $data['time'] = time();
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
27
$data['rcpt'] = implode(', ', $raw_data_decoded['rcpt']);
Open commit View diff
27 $data['rcpt'] = implode(', ', $raw_data_decoded['rcpt']);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
28
$data['from'] = $raw_data_decoded['from'];
Open commit View diff
28 $data['from'] = $raw_data_decoded['from'];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
29
$data['user'] = $raw_data_decoded['user'];
Open commit View diff
29 $data['user'] = $raw_data_decoded['user'];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
30
$symbol_rl_key = array_search('RATELIMITED', array_column($raw_data_decoded['symbols'], 'name'));
Open commit View diff
30 $symbol_rl_key = array_search('RATELIMITED', array_column($raw_data_decoded['symbols'], 'name'));
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
31
$data['rl_info'] = implode($raw_data_decoded['symbols'][$symbol_rl_key]['options']);
Open commit View diff
31 $data['rl_info'] = implode($raw_data_decoded['symbols'][$symbol_rl_key]['options']);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
32
preg_match('/(.+)\((.+)\)/i', $data['rl_info'], $rl_matches);
Open commit View diff
32 preg_match('/(.+)\((.+)\)/i', $data['rl_info'], $rl_matches);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
33
if (!empty($rl_matches[1]) && !empty($rl_matches[2])) {
Open commit View diff
33 if (!empty($rl_matches[1]) && !empty($rl_matches[2])) {
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
34
  $data['rl_name'] = $rl_matches[1];
Open commit View diff
34 $data['rl_name'] = $rl_matches[1];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
35
  $data['rl_hash'] = $rl_matches[2];
Open commit View diff
35 $data['rl_hash'] = $rl_matches[2];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
36
}
Open commit View diff
36 }
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
37
else {
Open commit View diff
37 else {
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
38
  $data['rl_name'] = 'err';
Open commit View diff
38 $data['rl_name'] = 'err';
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
39
  $data['rl_hash'] = 'err';
Open commit View diff
39 $data['rl_hash'] = 'err';
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
40
}
Open commit View diff
40 }
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
41
$data['qid'] = $raw_data_decoded['qid'];
Open commit View diff
41 $data['qid'] = $raw_data_decoded['qid'];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
42
$data['ip'] = $raw_data_decoded['ip'];
Open commit View diff
42 $data['ip'] = $raw_data_decoded['ip'];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
43
$data['message_id'] = $raw_data_decoded['message_id'];
Open commit View diff
43 $data['message_id'] = $raw_data_decoded['message_id'];
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
44
$data['header_subject'] = implode(' ', $raw_data_decoded['header_subject']);
Open commit View diff
44 $data['header_subject'] = implode(' ', $raw_data_decoded['header_subject']);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
45
$data['header_from'] = implode(', ', $raw_data_decoded['header_from']);
Open commit View diff
45 $data['header_from'] = implode(', ', $raw_data_decoded['header_from']);
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
46
Open commit View diff
46
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
47
$redis->lpush('RL_LOG', json_encode($data));
Open commit View diff
47 $redis->lpush('RL_LOG', json_encode($data));
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
48
exit;
Open commit View diff
48 exit;
same change ed763cd

[Rspamd] Use meta exporter to pipe meta data of ratelimited msg to Redis

Full commit hash
ed763cd668b395821c04e116fc4d7ef10fa4a6d1
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
49
Open commit View diff
49