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/pushover.php

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

pushover.php on main
Author Date Commit Line Code
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 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 ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 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 ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 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 ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
8
// Init database
Open commit View diff
8 // Init database
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
9
//$dsn = $database_type . ':host=' . $database_host . ';dbname=' . $database_name;
Open commit View diff
9 //$dsn = $database_type . ':host=' . $database_host . ';dbname=' . $database_name;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
10
$dsn = $database_type . ":unix_socket=" . $database_sock . ";dbname=" . $database_name;
Open commit View diff
10 $dsn = $database_type . ":unix_socket=" . $database_sock . ";dbname=" . $database_name;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
11
$opt = [
Open commit View diff
11 $opt = [
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
12
    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
Open commit View diff
12 PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
13
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
Open commit View diff
13 PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
14
    PDO::ATTR_EMULATE_PREPARES   => false,
Open commit View diff
14 PDO::ATTR_EMULATE_PREPARES => false,
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
15
];
Open commit View diff
15 ];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
17
  $pdo = new PDO($dsn, $database_user, $database_pass, $opt);
Open commit View diff
17 $pdo = new PDO($dsn, $database_user, $database_pass, $opt);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
20
  error_log("NOTIFY: " . $e . PHP_EOL);
Open commit View diff
20 error_log("NOTIFY: " . $e . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
21
  http_response_code(501);
Open commit View diff
21 http_response_code(501);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
24
// Init Redis
Open commit View diff
24 // Init Redis
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
25
$redis = new Redis();
Open commit View diff
25 $redis = new Redis();
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
26
$redis->connect('redis-mailcow', 6379);
Open commit View diff
26 $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
27
$redis->auth(getenv("REDISPASS"));
Open commit View diff
27 $redis->auth(getenv("REDISPASS"));
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
28
Open commit View diff
28
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
29
// Functions
Open commit View diff
29 // Functions
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
30
function parse_email($email) {
Open commit View diff
30 function parse_email($email) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
31
  if(!filter_var($email, FILTER_VALIDATE_EMAIL)) return false;
Open commit View diff
31 if(!filter_var($email, FILTER_VALIDATE_EMAIL)) return false;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
32
  $a = strrpos($email, '@');
Open commit View diff
32 $a = strrpos($email, '@');
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
33
  return array('local' => substr($email, 0, $a), 'domain' => substr(substr($email, $a), 1));
Open commit View diff
33 return array('local' => substr($email, 0, $a), 'domain' => substr(substr($email, $a), 1));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
34
}
Open commit View diff
34 }
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
35
// rspamd metadata_exporter (multipart formatter): metadata JSON arrives as $_POST['metadata'].
Open commit View diff
35 // rspamd metadata_exporter (multipart formatter): metadata JSON arrives as $_POST['metadata'].
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
36
if (empty($_POST['metadata'])) {
Open commit View diff
36 if (empty($_POST['metadata'])) {
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
37
  error_log("NOTIFY: missing metadata part from rspamd" . PHP_EOL);
Open commit View diff
37 error_log("NOTIFY: missing metadata part from rspamd" . PHP_EOL);
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
38
  http_response_code(400);
Open commit View diff
38 http_response_code(400);
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
39
  exit;
Open commit View diff
39 exit;
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
41
Open commit View diff
41
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
42
$meta = json_decode($_POST['metadata'], true);
Open commit View diff
42 $meta = json_decode($_POST['metadata'], true);
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
43
if (!is_array($meta)) {
Open commit View diff
43 if (!is_array($meta)) {
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
44
  error_log("NOTIFY: cannot decode metadata JSON" . PHP_EOL);
Open commit View diff
44 error_log("NOTIFY: cannot decode metadata JSON" . PHP_EOL);
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
45
  http_response_code(400);
Open commit View diff
45 http_response_code(400);
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
46
  exit;
Open commit View diff
46 exit;
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
47
}
Open commit View diff
47 }
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
48
Open commit View diff
48
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
49
$qid      = $meta['qid']    ?? 'unknown';
Open commit View diff
49 $qid = $meta['qid'] ?? 'unknown';
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
50
$rcpts    = $meta['rcpt']   ?? array();
Open commit View diff
50 $rcpts = $meta['rcpt'] ?? array();
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
51
$sender   = $meta['from']   ?? '';
Open commit View diff
51 $sender = $meta['from'] ?? '';
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
52
$ip       = $meta['ip']     ?? 'unknown';
Open commit View diff
52 $ip = $meta['ip'] ?? 'unknown';
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
53
$subject  = iconv_mime_decode($meta['subject'] ?? '');
Open commit View diff
53 $subject = iconv_mime_decode($meta['subject'] ?? '');
same change 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
54
$messageid= $meta['message_id'] ?? '';
Open commit View diff
54 $messageid= $meta['message_id'] ?? '';
bluewalk over 3 years ago d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
55
$priority = 0;
Open commit View diff
55 $priority = 0;
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
56
Open commit View diff
56
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
57
$symbols_array = $meta['symbols'] ?? array();
Open commit View diff
57 $symbols_array = $meta['symbols'] ?? array();
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
58
if (is_array($symbols_array)) {
Open commit View diff
58 if (is_array($symbols_array)) {
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
59
  foreach ($symbols_array as $symbol) {
Open commit View diff
59 foreach ($symbols_array as $symbol) {
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
60
    if (($symbol['name'] ?? null) == 'HAS_X_PRIO_ONE') {
Open commit View diff
60 if (($symbol['name'] ?? null) == 'HAS_X_PRIO_ONE') {
andryyy over 6 years ago fec0f68

[Rspamd] More Pushover fixes

Full commit hash
fec0f688b1f1946ffaa4b7c63bd1010f9ab129cb
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
61
      $priority = 1;
Open commit View diff
61 $priority = 1;
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
62
      break;
Open commit View diff
62 break;
same change c67bb75

[Rspamd] More pushover options

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

[Rspamd] More pushover options

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

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
65
}
Open commit View diff
65 }
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
66
Open commit View diff
66
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
67
$sender_address = $meta['header_from'][0] ?? '';
Open commit View diff
67 $sender_address = $meta['header_from'][0] ?? '';
bluewalk over 3 years ago d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
68
$sender_name = '-';
Open commit View diff
68 $sender_name = '-';
same change d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
69
if (preg_match('/(?<name>.*?)<(?<address>.*?)>/i', $sender_address, $matches)) {
Open commit View diff
69 if (preg_match('/(?<name>.*?)<(?<address>.*?)>/i', $sender_address, $matches)) {
same change d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
70
	$sender_address = $matches['address'];
Open commit View diff
70 $sender_address = $matches['address'];
bluewalk over 3 years ago 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
71
  $sender_name =  trim($matches['name'], '"\' ');
Open commit View diff
71 $sender_name = trim($matches['name'], '"\' ');
same change 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
72
}
Open commit View diff
72 }
same change 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
73
Open commit View diff
73
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
74
$to_address = $meta['header_to'][0] ?? '';
Open commit View diff
74 $to_address = $meta['header_to'][0] ?? '';
bluewalk over 3 years ago 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
75
$to_name = '-';
Open commit View diff
75 $to_name = '-';
same change 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
76
if (preg_match('/(?<name>.*?)<(?<address>.*?)>/i', $to_address, $matches)) {
Open commit View diff
76 if (preg_match('/(?<name>.*?)<(?<address>.*?)>/i', $to_address, $matches)) {
same change 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
77
	$to_address = $matches['address'];
Open commit View diff
77 $to_address = $matches['address'];
same change 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
78
  $to_name =  trim($matches['name'], '"\' ');
Open commit View diff
78 $to_name = trim($matches['name'], '"\' ');
bluewalk over 3 years ago d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
79
}
Open commit View diff
79 }
bluewalk over 3 years ago e82f3b3

Added SENDER_ADDRESS and SENDER_NAME as variables for messages

Full commit hash
e82f3b39755d6bc20ebd0fe5c316028bf7b8f1ea
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
80
Open commit View diff
80
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
81
$rcpt_final_mailboxes = array();
Open commit View diff
81 $rcpt_final_mailboxes = array();
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
82
Open commit View diff
82
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
83
// Loop through all rcpts
Open commit View diff
83 // Loop through all rcpts
FreddleSpl0it about 1 month ago 24cc369

[Rspamd] Migrate metadata_exporter to multipart formatter

Full commit hash
24cc369d84935428f58a4c6bef5b18a58ad248ed
Author
FreddleSpl0it <[email protected]>
Date
about 1 month ago
Selected line
84
foreach ($rcpts as $rcpt) {
Open commit View diff
84 foreach ($rcpts as $rcpt) {
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
85
  // Remove tag
Open commit View diff
85 // Remove tag
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
86
  $rcpt = preg_replace('/^(.*?)\+.*(@.*)$/', '$1$2', $rcpt);
Open commit View diff
86 $rcpt = preg_replace('/^(.*?)\+.*(@.*)$/', '$1$2', $rcpt);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
87
Open commit View diff
87
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
88
  // Break rcpt into local part and domain part
Open commit View diff
88 // Break rcpt into local part and domain part
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
89
  $parsed_rcpt = parse_email($rcpt);
Open commit View diff
89 $parsed_rcpt = parse_email($rcpt);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
90
Open commit View diff
90
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
91
  // Skip if not a mailcow handled domain
Open commit View diff
91 // Skip if not a mailcow handled domain
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
93
    if (!$redis->hGet('DOMAIN_MAP', $parsed_rcpt['domain'])) {
Open commit View diff
93 if (!$redis->hGet('DOMAIN_MAP', $parsed_rcpt['domain'])) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
94
      continue;
Open commit View diff
94 continue;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
97
  catch (RedisException $e) {
Open commit View diff
97 catch (RedisException $e) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
98
    error_log("NOTIFY: " . $e . PHP_EOL);
Open commit View diff
98 error_log("NOTIFY: " . $e . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
99
    http_response_code(504);
Open commit View diff
99 http_response_code(504);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
102
Open commit View diff
102
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
103
  // Always assume rcpt is not a final mailbox but an alias for a mailbox or further aliases
Open commit View diff
103 // Always assume rcpt is not a final mailbox but an alias for a mailbox or further aliases
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
104
  //
Open commit View diff
104 //
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
105
  //             rcpt
Open commit View diff
105 // rcpt
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
106
  //              |
Open commit View diff
106 // |
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
107
  // mailbox <-- goto ---> alias1, alias2, mailbox2
Open commit View diff
107 // mailbox <-- goto ---> alias1, alias2, mailbox2
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
108
  //                          |       |
Open commit View diff
108 // | |
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
109
  //                      mailbox3    |
Open commit View diff
109 // mailbox3 |
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
110
  //                                  |
Open commit View diff
110 // |
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
111
  //                               alias3 ---> mailbox4
Open commit View diff
111 // alias3 ---> mailbox4
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
112
  //
Open commit View diff
112 //
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
113
  try {
Open commit View diff
113 try {
andryyy almost 6 years ago 1e244e9

[Rspamd] Quarantine, Pushover: Respect active = 2 while processing

Full commit hash
1e244e9c0c43a350e4365679cf0e32ef2c65efa8
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
114
    $stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :rcpt AND `active` = '1'");
Open commit View diff
114 $stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :rcpt AND `active` = '1'");
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
115
    $stmt->execute(array(
Open commit View diff
115 $stmt->execute(array(
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
116
      ':rcpt' => $rcpt
Open commit View diff
116 ':rcpt' => $rcpt
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
117
    ));
Open commit View diff
117 ));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
118
    $gotos = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
Open commit View diff
118 $gotos = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
119
    if (empty($gotos)) {
Open commit View diff
119 if (empty($gotos)) {
andryyy almost 6 years ago 1e244e9

[Rspamd] Quarantine, Pushover: Respect active = 2 while processing

Full commit hash
1e244e9c0c43a350e4365679cf0e32ef2c65efa8
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
120
      $stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :rcpt AND `active` = '1'");
Open commit View diff
120 $stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :rcpt AND `active` = '1'");
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
121
      $stmt->execute(array(
Open commit View diff
121 $stmt->execute(array(
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
122
        ':rcpt' => '@' . $parsed_rcpt['domain']
Open commit View diff
122 ':rcpt' => '@' . $parsed_rcpt['domain']
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
123
      ));
Open commit View diff
123 ));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
124
      $gotos = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
Open commit View diff
124 $gotos = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
126
    if (empty($gotos)) {
Open commit View diff
126 if (empty($gotos)) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
127
      $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :rcpt AND `active` = '1'");
Open commit View diff
127 $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :rcpt AND `active` = '1'");
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
128
      $stmt->execute(array(':rcpt' => $parsed_rcpt['domain']));
Open commit View diff
128 $stmt->execute(array(':rcpt' => $parsed_rcpt['domain']));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
129
      $goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['target_domain'];
Open commit View diff
129 $goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['target_domain'];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
130
      if ($goto_branch) {
Open commit View diff
130 if ($goto_branch) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
131
        $gotos = $parsed_rcpt['local'] . '@' . $goto_branch;
Open commit View diff
131 $gotos = $parsed_rcpt['local'] . '@' . $goto_branch;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
134
    $gotos_array = explode(',', $gotos);
Open commit View diff
134 $gotos_array = explode(',', $gotos);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
135
Open commit View diff
135
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
136
    $loop_c = 0;
Open commit View diff
136 $loop_c = 0;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
137
Open commit View diff
137
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
138
    while (count($gotos_array) != 0 && $loop_c <= 20) {
Open commit View diff
138 while (count($gotos_array) != 0 && $loop_c <= 20) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
139
Open commit View diff
139
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
140
      // Loop through all found gotos
Open commit View diff
140 // Loop through all found gotos
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
141
      foreach ($gotos_array as $index => &$goto) {
Open commit View diff
141 foreach ($gotos_array as $index => &$goto) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
142
        error_log("RCPT RESOVLER: http pipe: query " . $goto . " as username from mailbox" . PHP_EOL);
Open commit View diff
142 error_log("RCPT RESOVLER: http pipe: query " . $goto . " as username from mailbox" . PHP_EOL);
andryyy almost 6 years ago 520056a

[Rspamd] Quarantine, Pushover: Respect active = 2 while processing

Full commit hash
520056a489701a11762e2daf1e3712001c5b548e
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
143
        $stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND (`active`= '1' OR `active`= '2');");
Open commit View diff
143 $stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND (`active`= '1' OR `active`= '2');");
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
144
        $stmt->execute(array(':goto' => $goto));
Open commit View diff
144 $stmt->execute(array(':goto' => $goto));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
145
        $username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
Open commit View diff
145 $username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
146
        if (!empty($username)) {
Open commit View diff
146 if (!empty($username)) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
147
          error_log("RCPT RESOVLER: http pipe: mailbox found: " . $username . PHP_EOL);
Open commit View diff
147 error_log("RCPT RESOVLER: http pipe: mailbox found: " . $username . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
148
          // Current goto is a mailbox, save to rcpt_final_mailboxes if not a duplicate
Open commit View diff
148 // Current goto is a mailbox, save to rcpt_final_mailboxes if not a duplicate
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
149
          if (!in_array($username, $rcpt_final_mailboxes)) {
Open commit View diff
149 if (!in_array($username, $rcpt_final_mailboxes)) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
150
            $rcpt_final_mailboxes[] = $username;
Open commit View diff
150 $rcpt_final_mailboxes[] = $username;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
154
          $parsed_goto = parse_email($goto);
Open commit View diff
154 $parsed_goto = parse_email($goto);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
155
          if (!$redis->hGet('DOMAIN_MAP', $parsed_goto['domain'])) {
Open commit View diff
155 if (!$redis->hGet('DOMAIN_MAP', $parsed_goto['domain'])) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
156
            error_log("RCPT RESOVLER:" . $goto . " is not a mailcow handled mailbox or alias address" . PHP_EOL);
Open commit View diff
156 error_log("RCPT RESOVLER:" . $goto . " is not a mailcow handled mailbox or alias address" . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
158
          else {
Open commit View diff
158 else {
andryyy almost 6 years ago 1e244e9

[Rspamd] Quarantine, Pushover: Respect active = 2 while processing

Full commit hash
1e244e9c0c43a350e4365679cf0e32ef2c65efa8
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
159
            $stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :goto AND `active` = '1'");
Open commit View diff
159 $stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :goto AND `active` = '1'");
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
160
            $stmt->execute(array(':goto' => $goto));
Open commit View diff
160 $stmt->execute(array(':goto' => $goto));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
161
            $goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
Open commit View diff
161 $goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['goto'];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
162
            if ($goto_branch) {
Open commit View diff
162 if ($goto_branch) {
andryyy almost 6 years ago 5cd6bed

[Rspamd] Fix typo in alias resolvers

Full commit hash
5cd6bed70155c63de3833eed65b80a6fe02b4e13
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
163
              error_log("RCPT RESOVLER: http pipe: goto address " . $goto . " is an alias branch for " . $goto_branch . PHP_EOL);
Open commit View diff
163 error_log("RCPT RESOVLER: http pipe: goto address " . $goto . " is an alias branch for " . $goto_branch . PHP_EOL);
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
164
              $goto_branch_array = explode(',', $goto_branch);
Open commit View diff
164 $goto_branch_array = explode(',', $goto_branch);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
165
            } else {
Open commit View diff
165 } else {
Patrik Kernstock 10 months ago d06d23b

Fix several SQL statements

Full commit hash
d06d23bbaf528f5edfb26d32d3d693b8005fc81e
Author
Patrik Kernstock <[email protected]>
Date
10 months ago
Selected line
166
              $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :domain AND `active` = '1'");
Open commit View diff
166 $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :domain AND `active` = '1'");
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
167
              $stmt->execute(array(':domain' => $parsed_goto['domain']));
Open commit View diff
167 $stmt->execute(array(':domain' => $parsed_goto['domain']));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
168
              $goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['target_domain'];
Open commit View diff
168 $goto_branch = $stmt->fetch(PDO::FETCH_ASSOC)['target_domain'];
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
169
              if ($goto_branch) {
Open commit View diff
169 if ($goto_branch) {
andryyy almost 6 years ago 5cd6bed

[Rspamd] Fix typo in alias resolvers

Full commit hash
5cd6bed70155c63de3833eed65b80a6fe02b4e13
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
170
                error_log("RCPT RESOVLER: http pipe: goto domain " . $parsed_goto['domain'] . " is a domain alias branch for " . $goto_branch . PHP_EOL);
Open commit View diff
170 error_log("RCPT RESOVLER: http pipe: goto domain " . $parsed_goto['domain'] . " is a domain alias branch for " . $goto_branch . PHP_EOL);
same change 5cd6bed

[Rspamd] Fix typo in alias resolvers

Full commit hash
5cd6bed70155c63de3833eed65b80a6fe02b4e13
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
171
                $goto_branch_array = array($parsed_goto['local'] . '@' . $goto_branch);
Open commit View diff
171 $goto_branch_array = array($parsed_goto['local'] . '@' . $goto_branch);
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
176
        // goto item was processed, unset
Open commit View diff
176 // goto item was processed, unset
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
177
        unset($gotos_array[$index]);
Open commit View diff
177 unset($gotos_array[$index]);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
179
Open commit View diff
179
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
180
      // Merge goto branch array derived from previous loop (if any), filter duplicates and unset goto branch array
Open commit View diff
180 // Merge goto branch array derived from previous loop (if any), filter duplicates and unset goto branch array
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
181
      if (!empty($goto_branch_array)) {
Open commit View diff
181 if (!empty($goto_branch_array)) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
182
        $gotos_array = array_unique(array_merge($gotos_array, $goto_branch_array));
Open commit View diff
182 $gotos_array = array_unique(array_merge($gotos_array, $goto_branch_array));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
183
        unset($goto_branch_array);
Open commit View diff
183 unset($goto_branch_array);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
185
Open commit View diff
185
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
186
      // Reindex array
Open commit View diff
186 // Reindex array
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
187
      $gotos_array = array_values($gotos_array);
Open commit View diff
187 $gotos_array = array_values($gotos_array);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
188
Open commit View diff
188
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
189
      // Force exit if loop cannot be solved
Open commit View diff
189 // Force exit if loop cannot be solved
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
190
      // Postfix does not allow for alias loops, so this should never happen.
Open commit View diff
190 // Postfix does not allow for alias loops, so this should never happen.
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
191
      $loop_c++;
Open commit View diff
191 $loop_c++;
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
192
      error_log("RCPT RESOVLER: http pipe: goto array count on loop #". $loop_c . " is " . count($gotos_array) . PHP_EOL);
Open commit View diff
192 error_log("RCPT RESOVLER: http pipe: goto array count on loop #". $loop_c . " is " . count($gotos_array) . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
195
  catch (PDOException $e) {
Open commit View diff
195 catch (PDOException $e) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
196
    error_log("RCPT RESOVLER: " . $e->getMessage() . PHP_EOL);
Open commit View diff
196 error_log("RCPT RESOVLER: " . $e->getMessage() . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
197
    http_response_code(502);
Open commit View diff
197 http_response_code(502);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
201
Open commit View diff
201
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
202
Open commit View diff
202
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
203
foreach ($rcpt_final_mailboxes as $rcpt_final) {
Open commit View diff
203 foreach ($rcpt_final_mailboxes as $rcpt_final) {
andryyy over 6 years ago fec0f68

[Rspamd] More Pushover fixes

Full commit hash
fec0f688b1f1946ffaa4b7c63bd1010f9ab129cb
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
204
  error_log("NOTIFY: pushover pipe: processing pushover message for rcpt " . $rcpt_final . PHP_EOL);
Open commit View diff
204 error_log("NOTIFY: pushover pipe: processing pushover message for rcpt " . $rcpt_final . PHP_EOL);
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
205
  $stmt = $pdo->prepare("SELECT * FROM `pushover`
Open commit View diff
205 $stmt = $pdo->prepare("SELECT * FROM `pushover`
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
206
    WHERE `username` = :username AND `active` = '1'");
Open commit View diff
206 WHERE `username` = :username AND `active` = '1'");
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
207
  $stmt->execute(array(
Open commit View diff
207 $stmt->execute(array(
andryyy over 6 years ago cb599db

[Rspamd] Fix quarantine and pushover notifications

Full commit hash
cb599db61e911a78cc9ead1c0f041140bd754c29
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
208
    ':username' => $rcpt_final
Open commit View diff
208 ':username' => $rcpt_final
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
209
  ));
Open commit View diff
209 ));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
210
  $api_data = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
210 $api_data = $stmt->fetch(PDO::FETCH_ASSOC);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
211
  if (isset($api_data['key']) && isset($api_data['token'])) {
Open commit View diff
211 if (isset($api_data['key']) && isset($api_data['token'])) {
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
212
    $title = (!empty($api_data['title'])) ? $api_data['title'] : 'Mail';
Open commit View diff
212 $title = (!empty($api_data['title'])) ? $api_data['title'] : 'Mail';
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
213
    $text = (!empty($api_data['text'])) ? $api_data['text'] : 'You\'ve got mail 📧';
Open commit View diff
213 $text = (!empty($api_data['text'])) ? $api_data['text'] : 'You\'ve got mail 📧';
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
214
    $attributes = json_decode($api_data['attributes'], true);
Open commit View diff
214 $attributes = json_decode($api_data['attributes'], true);
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
215
    $senders = explode(',', $api_data['senders']);
Open commit View diff
215 $senders = explode(',', $api_data['senders']);
andryyy over 6 years ago 1be3ca3

[Rspamd] Pushover fixes

Full commit hash
1be3ca3fb979f89762a4786d870b04c6b7e22a64
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
216
    $senders = array_filter($senders);
Open commit View diff
216 $senders = array_filter($senders);
andryyy over 6 years ago 47a15c2

[Rspamd] Pushover, check sender by regex

Full commit hash
47a15c21aaa69715e88535fc72925714004dfa2c
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
217
    $senders_regex = $api_data['senders_regex'];
Open commit View diff
217 $senders_regex = $api_data['senders_regex'];
andryyy over 6 years ago 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
218
    $sender_validated = false;
Open commit View diff
218 $sender_validated = false;
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
219
    if (empty($senders) && empty($senders_regex)) {
Open commit View diff
219 if (empty($senders) && empty($senders_regex)) {
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
220
      $sender_validated = true;
Open commit View diff
220 $sender_validated = true;
andryyy over 6 years ago 47a15c2

[Rspamd] Pushover, check sender by regex

Full commit hash
47a15c21aaa69715e88535fc72925714004dfa2c
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
221
    }
Open commit View diff
221 }
andryyy over 6 years ago 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
222
    else {
Open commit View diff
222 else {
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
223
      if (!empty($senders)) {
Open commit View diff
223 if (!empty($senders)) {
bluewalk over 3 years ago d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
224
        if (in_array($sender, $senders)) {
Open commit View diff
224 if (in_array($sender, $senders)) {
andryyy over 6 years ago 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
225
          $sender_validated = true;
Open commit View diff
225 $sender_validated = true;
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
226
        }
Open commit View diff
226 }
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
227
      }
Open commit View diff
227 }
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
228
      if (!empty($senders_regex) && $sender_validated !== true) {
Open commit View diff
228 if (!empty($senders_regex) && $sender_validated !== true) {
bluewalk over 3 years ago d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
229
        if (preg_match($senders_regex, $sender)) {
Open commit View diff
229 if (preg_match($senders_regex, $sender)) {
andryyy over 6 years ago 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
230
          $sender_validated = true;
Open commit View diff
230 $sender_validated = true;
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
231
        }
Open commit View diff
231 }
same change 35d3586

[Rspamd] Pushover: Fixes

Full commit hash
35d35869502575193f47d50c1dcfeff6510f2d01
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
232
      }
Open commit View diff
232 }
andryyy over 6 years ago 47a15c2

[Rspamd] Pushover, check sender by regex

Full commit hash
47a15c21aaa69715e88535fc72925714004dfa2c
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
233
    }
Open commit View diff
233 }
same change 47a15c2

[Rspamd] Pushover, check sender by regex

Full commit hash
47a15c21aaa69715e88535fc72925714004dfa2c
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
234
    if ($sender_validated === false) {
Open commit View diff
234 if ($sender_validated === false) {
bluewalk over 3 years ago d8e314d

Fixed issue with subdomain senders + added TO variable and allow new lines in text using \n

Full commit hash
d8e314db1a34ef29996f7575b66df894351685e3
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
235
      error_log("NOTIFY: pushover pipe: skipping unwanted sender " . $sender);
Open commit View diff
235 error_log("NOTIFY: pushover pipe: skipping unwanted sender " . $sender);
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
236
      continue;
Open commit View diff
236 continue;
same change c67bb75

[Rspamd] More pushover options

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

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
238
    if ($attributes['only_x_prio'] == "1" && $priority == 0) {
Open commit View diff
238 if ($attributes['only_x_prio'] == "1" && $priority == 0) {
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
239
      error_log("NOTIFY: pushover pipe: mail has no X-Priority: 1 header, skipping");
Open commit View diff
239 error_log("NOTIFY: pushover pipe: mail has no X-Priority: 1 header, skipping");
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
240
      continue;
Open commit View diff
240 continue;
same change c67bb75

[Rspamd] More pushover options

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

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
242
    $post_fields = array(
Open commit View diff
242 $post_fields = array(
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
243
      "token" => $api_data['token'],
Open commit View diff
243 "token" => $api_data['token'],
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
244
      "user" => $api_data['key'],
Open commit View diff
244 "user" => $api_data['key'],
bluewalk over 3 years ago 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
245
      "title" => sprintf("%s", str_replace(
Open commit View diff
245 "title" => sprintf("%s", str_replace(
Der-Jan over 3 years ago f1e1232

Add Message-ID to pushover

Full commit hash
f1e1232849dc8671d188079d8aa6cc54756bf221
Author
Der-Jan <[email protected]>
Date
over 3 years ago
Selected line
246
        array('{SUBJECT}', '{SENDER}', '{SENDER_NAME}', '{SENDER_ADDRESS}', '{TO_NAME}', '{TO_ADDRESS}', '{MSG_ID}'),
Open commit View diff
246 array('{SUBJECT}', '{SENDER}', '{SENDER_NAME}', '{SENDER_ADDRESS}', '{TO_NAME}', '{TO_ADDRESS}', '{MSG_ID}'),
same change f1e1232

Add Message-ID to pushover

Full commit hash
f1e1232849dc8671d188079d8aa6cc54756bf221
Author
Der-Jan <[email protected]>
Date
over 3 years ago
Selected line
247
        array($subject, $sender, $sender_name, $sender_address, $to_name, $to_address, $messageid), $title)
Open commit View diff
247 array($subject, $sender, $sender_name, $sender_address, $to_name, $to_address, $messageid), $title)
bluewalk over 3 years ago 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
248
      ),
Open commit View diff
248 ),
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
249
      "priority" => $priority,
Open commit View diff
249 "priority" => $priority,
bluewalk over 3 years ago 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
250
      "message" => sprintf("%s", str_replace(
Open commit View diff
250 "message" => sprintf("%s", str_replace(
Der-Jan over 3 years ago f1e1232

Add Message-ID to pushover

Full commit hash
f1e1232849dc8671d188079d8aa6cc54756bf221
Author
Der-Jan <[email protected]>
Date
over 3 years ago
Selected line
251
        array('{SUBJECT}', '{SENDER}', '{SENDER_NAME}', '{SENDER_ADDRESS}', '{TO_NAME}', '{TO_ADDRESS}', '{MSG_ID}', '\n'),
Open commit View diff
251 array('{SUBJECT}', '{SENDER}', '{SENDER_NAME}', '{SENDER_ADDRESS}', '{TO_NAME}', '{TO_ADDRESS}', '{MSG_ID}', '\n'),
same change f1e1232

Add Message-ID to pushover

Full commit hash
f1e1232849dc8671d188079d8aa6cc54756bf221
Author
Der-Jan <[email protected]>
Date
over 3 years ago
Selected line
252
        array($subject, $sender, $sender_name, $sender_address, $to_name, $to_address, $messageid, PHP_EOL), $text)
Open commit View diff
252 array($subject, $sender, $sender_name, $sender_address, $to_name, $to_address, $messageid, PHP_EOL), $text)
bluewalk over 3 years ago 360bb6f

Split name and address for TO-variables

Full commit hash
360bb6f30603f9bf3104e3fdc575159cc7729805
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
253
      ),
Open commit View diff
253 ),
bluewalk over 3 years ago 65c74c7

Added SENDER_ADDRESS and SENDER_NAME as variables for messages

Full commit hash
65c74c75c74c1a626b8d8c60921a6dcb689e8f4a
Author
bluewalk <[email protected]>
Date
over 3 years ago
Selected line
254
      "sound" => $attributes['sound'] ?? "pushover"
Open commit View diff
254 "sound" => $attributes['sound'] ?? "pushover"
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
255
    );
Open commit View diff
255 );
andryyy over 6 years ago fec0f68

[Rspamd] More Pushover fixes

Full commit hash
fec0f688b1f1946ffaa4b7c63bd1010f9ab129cb
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
256
    if ($attributes['evaluate_x_prio'] == "1" && $priority == 1) {
Open commit View diff
256 if ($attributes['evaluate_x_prio'] == "1" && $priority == 1) {
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
257
      $post_fields['expire'] = 600;
Open commit View diff
257 $post_fields['expire'] = 600;
same change c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
258
      $post_fields['retry'] = 120;
Open commit View diff
258 $post_fields['retry'] = 120;
andryyy over 6 years ago fec0f68

[Rspamd] More Pushover fixes

Full commit hash
fec0f688b1f1946ffaa4b7c63bd1010f9ab129cb
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
259
      $post_fields['priority'] = 2;
Open commit View diff
259 $post_fields['priority'] = 2;
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
260
    }
Open commit View diff
260 }
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
261
    curl_setopt_array($ch = curl_init(), array(
Open commit View diff
261 curl_setopt_array($ch = curl_init(), array(
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
262
      CURLOPT_URL => "https://api.pushover.net/1/messages.json",
Open commit View diff
262 CURLOPT_URL => "https://api.pushover.net/1/messages.json",
andryyy over 6 years ago c67bb75

[Rspamd] More pushover options

Full commit hash
c67bb75071089c1e8f057721e5efdf085ec0c385
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
263
      CURLOPT_POSTFIELDS => $post_fields,
Open commit View diff
263 CURLOPT_POSTFIELDS => $post_fields,
andryyy over 6 years ago ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
264
      CURLOPT_SAFE_UPLOAD => true,
Open commit View diff
264 CURLOPT_SAFE_UPLOAD => true,
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
265
      CURLOPT_RETURNTRANSFER => true,
Open commit View diff
265 CURLOPT_RETURNTRANSFER => true,
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
266
    ));
Open commit View diff
266 ));
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
267
    $result = curl_exec($ch);
Open commit View diff
267 $result = curl_exec($ch);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
268
    $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Open commit View diff
268 $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
269
    curl_close($ch);
Open commit View diff
269 curl_close($ch);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
270
    error_log("NOTIFY: result: " . $httpcode . PHP_EOL);
Open commit View diff
270 error_log("NOTIFY: result: " . $httpcode . PHP_EOL);
same change ccdb7fc

[Rspamd] Add metadata exporter for unauthed mail

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

[Rspamd] Add metadata exporter for unauthed mail

Full commit hash
ccdb7fcd2693bd5f0e3929eec8daccb414403f47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
272
}
Open commit View diff
272 }