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/web/inc/ajax/qitem_details.php

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

qitem_details.php on main
Author Date Commit Line Code
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
2
header("Content-Type: application/json");
Open commit View diff
2 header("Content-Type: application/json");
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
3
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
Open commit View diff
3 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
Howaner about 7 years ago 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
4
Open commit View diff
4
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
5
function rrmdir($src) {
Open commit View diff
5 function rrmdir($src) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
6
  $dir = opendir($src);
Open commit View diff
6 $dir = opendir($src);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
7
  while(false !== ( $file = readdir($dir)) ) {
Open commit View diff
7 while(false !== ( $file = readdir($dir)) ) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
8
    if (( $file != '.' ) && ( $file != '..' )) {
Open commit View diff
8 if (( $file != '.' ) && ( $file != '..' )) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
9
      $full = $src . '/' . $file;
Open commit View diff
9 $full = $src . '/' . $file;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
10
      if ( is_dir($full) ) {
Open commit View diff
10 if ( is_dir($full) ) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
11
        rrmdir($full);
Open commit View diff
11 rrmdir($full);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
12
      }
Open commit View diff
12 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
13
      else {
Open commit View diff
13 else {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
14
        unlink($full);
Open commit View diff
14 unlink($full);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
15
      }
Open commit View diff
15 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
16
    }
Open commit View diff
16 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
17
  }
Open commit View diff
17 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
18
  closedir($dir);
Open commit View diff
18 closedir($dir);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
19
  rmdir($src);
Open commit View diff
19 rmdir($src);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
20
}
Open commit View diff
20 }
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
21
Open commit View diff
21
Howaner about 7 years ago 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
22
function addAddresses(&$list, $mail, $headerName) {
Open commit View diff
22 function addAddresses(&$list, $mail, $headerName) {
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
23
  $addresses = $mail->getAddresses($headerName);
Open commit View diff
23 $addresses = $mail->getAddresses($headerName);
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
24
  foreach ($addresses as $address) {
Open commit View diff
24 foreach ($addresses as $address) {
andryyy about 6 years ago 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
25
    if (filter_var($address['address'], FILTER_VALIDATE_EMAIL)) {
Open commit View diff
25 if (filter_var($address['address'], FILTER_VALIDATE_EMAIL)) {
same change 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
26
      $list[] = array('address' => $address['address'], 'type' => $headerName);
Open commit View diff
26 $list[] = array('address' => $address['address'], 'type' => $headerName);
same change 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
27
    }
Open commit View diff
27 }
Howaner about 7 years ago 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
28
  }
Open commit View diff
28 }
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
29
}
Open commit View diff
29 }
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
30
Open commit View diff
30
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
31
if (!empty($_GET['hash']) && ctype_alnum($_GET['hash'])) {
Open commit View diff
31 if (!empty($_GET['hash']) && ctype_alnum($_GET['hash'])) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
32
  $mailc = quarantine('hash_details', $_GET['hash']);
Open commit View diff
32 $mailc = quarantine('hash_details', $_GET['hash']);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
33
  if ($mailc === false) {
Open commit View diff
33 if ($mailc === false) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
34
    echo json_encode(array('error' => 'Message invalid'));
Open commit View diff
34 echo json_encode(array('error' => 'Message invalid'));
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
35
    exit;
Open commit View diff
35 exit;
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
36
  }
Open commit View diff
36 }
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
37
  if (strlen($mailc['msg']) > 10485760) {
Open commit View diff
37 if (strlen($mailc['msg']) > 10485760) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
38
    echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
Open commit View diff
38 echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
39
    exit;
Open commit View diff
39 exit;
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

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

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
41
  if (!empty($mailc['msg'])) {
Open commit View diff
41 if (!empty($mailc['msg'])) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
42
    // Init message array
Open commit View diff
42 // Init message array
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
43
    $data = array();
Open commit View diff
43 $data = array();
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
44
    // Init parser
Open commit View diff
44 // Init parser
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
45
    $mail_parser = new PhpMimeMailParser\Parser();
Open commit View diff
45 $mail_parser = new PhpMimeMailParser\Parser();
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
46
    $html2text = new Html2Text\Html2Text();
Open commit View diff
46 $html2text = new Html2Text\Html2Text();
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
47
    // Load msg to parser
Open commit View diff
47 // Load msg to parser
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
48
    $mail_parser->setText($mailc['msg']);
Open commit View diff
48 $mail_parser->setText($mailc['msg']);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
49
    // Get mail recipients
Open commit View diff
49 // Get mail recipients
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
50
    {
Open commit View diff
50 {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
51
      $recipientsList = array();
Open commit View diff
51 $recipientsList = array();
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
52
      addAddresses($recipientsList, $mail_parser, 'to');
Open commit View diff
52 addAddresses($recipientsList, $mail_parser, 'to');
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
53
      addAddresses($recipientsList, $mail_parser, 'cc');
Open commit View diff
53 addAddresses($recipientsList, $mail_parser, 'cc');
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
54
      addAddresses($recipientsList, $mail_parser, 'bcc');
Open commit View diff
54 addAddresses($recipientsList, $mail_parser, 'bcc');
andryyy about 6 years ago 48b74d7

[Web] Fix PHPMailer, minor style change for quarantine rcpts

Full commit hash
48b74d77a0c39bcb3399ce6603e1ad424f01fc3e
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
55
      $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'smtp');
Open commit View diff
55 $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'smtp');
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
56
      $data['recipients'] = $recipientsList;
Open commit View diff
56 $data['recipients'] = $recipientsList;
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
57
    }
Open commit View diff
57 }
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
58
    // Get from
Open commit View diff
58 // Get from
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
59
    $data['header_from'] = $mail_parser->getHeader('from');
Open commit View diff
59 $data['header_from'] = $mail_parser->getHeader('from');
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
60
    $data['env_from'] = $mailc['sender'];
Open commit View diff
60 $data['env_from'] = $mailc['sender'];
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
61
    // Get rspamd score
Open commit View diff
61 // Get rspamd score
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
62
    $data['score'] = $mailc['score'];
Open commit View diff
62 $data['score'] = $mailc['score'];
andryyy over 5 years ago b9a8b8a

[Web] More custom_params

Full commit hash
b9a8b8a3e79646409f91e2cdcd09ca44752cb5f5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
63
    // Get rspamd action
Open commit View diff
63 // Get rspamd action
same change b9a8b8a

[Web] More custom_params

Full commit hash
b9a8b8a3e79646409f91e2cdcd09ca44752cb5f5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
64
    $data['action'] = $mailc['action'];
Open commit View diff
64 $data['action'] = $mailc['action'];
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
65
    // Get rspamd symbols
Open commit View diff
65 // Get rspamd symbols
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
66
    $data['symbols'] = json_decode($mailc['symbols']);
Open commit View diff
66 $data['symbols'] = json_decode($mailc['symbols']);
andryyy over 5 years ago 0165c9d

[Web] Show fuzzy hash of rejected mail, if any

Full commit hash
0165c9d26b71b696a848ca1145e105b6a66b55c0
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
67
    // Get fuzzy hashes
Open commit View diff
67 // Get fuzzy hashes
same change 0165c9d

[Web] Show fuzzy hash of rejected mail, if any

Full commit hash
0165c9d26b71b696a848ca1145e105b6a66b55c0
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
68
    $data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
Open commit View diff
68 $data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
andryyy over 5 years ago da3fc31

[Web] Fix Rspamd symbols in quarantine overview

Full commit hash
da3fc31500bb52657476c29e170d3207c7c636cf
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
69
    $data['subject'] = mb_convert_encoding($mail_parser->getHeader('subject'), "UTF-8", "auto");
Open commit View diff
69 $data['subject'] = mb_convert_encoding($mail_parser->getHeader('subject'), "UTF-8", "auto");
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
70
    (empty($data['subject'])) ? $data['subject'] = '-' : null;
Open commit View diff
70 (empty($data['subject'])) ? $data['subject'] = '-' : null;
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
71
    echo json_encode($data);
Open commit View diff
71 echo json_encode($data);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
72
  }
Open commit View diff
72 }
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
73
}
Open commit View diff
73 }
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
74
elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
Open commit View diff
74 elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
75
  if (!isset($_SESSION['mailcow_cc_role'])) {
Open commit View diff
75 if (!isset($_SESSION['mailcow_cc_role'])) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
76
    echo json_encode(array('error' => 'Access denied'));
Open commit View diff
76 echo json_encode(array('error' => 'Access denied'));
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
77
    exit();
Open commit View diff
77 exit();
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
78
  }
Open commit View diff
78 }
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
79
  $tmpdir = '/tmp/' . $_GET['id'] . '/';
Open commit View diff
79 $tmpdir = '/tmp/' . $_GET['id'] . '/';
André Peters over 8 years ago a500364

[Web] Mind was set to french, reverting to english

Full commit hash
a50036477eee7d80d58c3147c5b1dfbe013f4380
Author
André Peters <[email protected]>
Date
over 8 years ago
Selected line
80
  $mailc = quarantine('details', $_GET['id']);
Open commit View diff
80 $mailc = quarantine('details', $_GET['id']);
andryyy about 6 years ago 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
81
  if ($mailc === false) {
Open commit View diff
81 if ($mailc === false) {
same change 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
82
    echo json_encode(array('error' => 'Access denied'));
Open commit View diff
82 echo json_encode(array('error' => 'Access denied'));
same change 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
83
    exit;
Open commit View diff
83 exit;
same change 22f0a14

[Web] Add SMTP rcpt to qitems, filter invalid addresses

Full commit hash
22f0a14b8710f246496f8456c2c8b61193a49949
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
84
  }
Open commit View diff
84 }
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
85
  if (strlen($mailc['msg']) > 10485760) {
Open commit View diff
85 if (strlen($mailc['msg']) > 10485760) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
86
    echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
Open commit View diff
86 echo json_encode(array('error' => 'Message size exceeds 10 MiB.'));
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
87
    exit;
Open commit View diff
87 exit;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
88
  }
Open commit View diff
88 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
89
  if (!empty($mailc['msg'])) {
Open commit View diff
89 if (!empty($mailc['msg'])) {
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
90
    if (isset($_GET['quick_release'])) {
Open commit View diff
90 if (isset($_GET['quick_release'])) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
91
      $hash = hash('sha256', $mailc['id'] . $mailc['qid']);
Open commit View diff
91 $hash = hash('sha256', $mailc['id'] . $mailc['qid']);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
92
      header('Location: /qhandler/release/' . $hash);
Open commit View diff
92 header('Location: /qhandler/release/' . $hash);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
93
      exit;
Open commit View diff
93 exit;
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
94
    }
Open commit View diff
94 }
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
95
    if (isset($_GET['quick_delete'])) {
Open commit View diff
95 if (isset($_GET['quick_delete'])) {
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
96
      $hash = hash('sha256', $mailc['id'] . $mailc['qid']);
Open commit View diff
96 $hash = hash('sha256', $mailc['id'] . $mailc['qid']);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
97
      header('Location: /qhandler/delete/' . $hash);
Open commit View diff
97 header('Location: /qhandler/delete/' . $hash);
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
98
      exit;
Open commit View diff
98 exit;
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
99
    }
Open commit View diff
99 }
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
100
    // Init message array
Open commit View diff
100 // Init message array
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
101
    $data = array();
Open commit View diff
101 $data = array();
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
102
    // Init parser
Open commit View diff
102 // Init parser
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
103
    $mail_parser = new PhpMimeMailParser\Parser();
Open commit View diff
103 $mail_parser = new PhpMimeMailParser\Parser();
andre.peters over 8 years ago 79cb929

[Web] Add html2text converter; Show quarantaine html elements as text, do not escape html

Full commit hash
79cb9299119cf613e9bbfe714c540cc8b4b90365
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
104
    $html2text = new Html2Text\Html2Text();
Open commit View diff
104 $html2text = new Html2Text\Html2Text();
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
105
    // Load msg to parser
Open commit View diff
105 // Load msg to parser
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
106
    $mail_parser->setText($mailc['msg']);
Open commit View diff
106 $mail_parser->setText($mailc['msg']);
Howaner about 7 years ago 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
107
Open commit View diff
107
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
108
    // Get mail recipients
Open commit View diff
108 // Get mail recipients
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
109
    {
Open commit View diff
109 {
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
110
      $recipientsList = array();
Open commit View diff
110 $recipientsList = array();
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
111
      addAddresses($recipientsList, $mail_parser, 'to');
Open commit View diff
111 addAddresses($recipientsList, $mail_parser, 'to');
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
112
      addAddresses($recipientsList, $mail_parser, 'cc');
Open commit View diff
112 addAddresses($recipientsList, $mail_parser, 'cc');
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
113
      addAddresses($recipientsList, $mail_parser, 'bcc');
Open commit View diff
113 addAddresses($recipientsList, $mail_parser, 'bcc');
andryyy about 6 years ago 48b74d7

[Web] Fix PHPMailer, minor style change for quarantine rcpts

Full commit hash
48b74d77a0c39bcb3399ce6603e1ad424f01fc3e
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
114
      $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'smtp');
Open commit View diff
114 $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'smtp');
Howaner about 7 years ago 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
115
      $data['recipients'] = $recipientsList;
Open commit View diff
115 $data['recipients'] = $recipientsList;
same change 17918b3

Added domain alias handling to quarantine mails and added recipients row to quarantine mail display

Full commit hash
17918b3e214d19fc4cc31da74511b3fe6b7038d1
Author
Howaner <[email protected]>
Date
about 7 years ago
Selected line
116
    }
Open commit View diff
116 }
andryyy about 6 years ago b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
117
    // Get from
Open commit View diff
117 // Get from
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
118
    $data['header_from'] = $mail_parser->getHeader('from');
Open commit View diff
118 $data['header_from'] = $mail_parser->getHeader('from');
same change b93371c

[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

Full commit hash
b93371ca0aaf8cb416f1952351d52ffd46ad8091
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
119
    $data['env_from'] = $mailc['sender'];
Open commit View diff
119 $data['env_from'] = $mailc['sender'];
friedPotat0 almost 7 years ago cb17d71

Add score, symbols to quarantine detail view

Full commit hash
cb17d71c61df0cecf4f7fcfb6e55179aeece94df
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
120
    // Get rspamd score
Open commit View diff
120 // Get rspamd score
same change cb17d71

Add score, symbols to quarantine detail view

Full commit hash
cb17d71c61df0cecf4f7fcfb6e55179aeece94df
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
121
    $data['score'] = $mailc['score'];
Open commit View diff
121 $data['score'] = $mailc['score'];
andryyy over 5 years ago b9a8b8a

[Web] More custom_params

Full commit hash
b9a8b8a3e79646409f91e2cdcd09ca44752cb5f5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
122
    // Get rspamd action
Open commit View diff
122 // Get rspamd action
same change b9a8b8a

[Web] More custom_params

Full commit hash
b9a8b8a3e79646409f91e2cdcd09ca44752cb5f5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
123
    $data['action'] = $mailc['action'];
Open commit View diff
123 $data['action'] = $mailc['action'];
friedPotat0 almost 7 years ago cb17d71

Add score, symbols to quarantine detail view

Full commit hash
cb17d71c61df0cecf4f7fcfb6e55179aeece94df
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
124
    // Get rspamd symbols
Open commit View diff
124 // Get rspamd symbols
same change cb17d71

Add score, symbols to quarantine detail view

Full commit hash
cb17d71c61df0cecf4f7fcfb6e55179aeece94df
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
125
    $data['symbols'] = json_decode($mailc['symbols']);
Open commit View diff
125 $data['symbols'] = json_decode($mailc['symbols']);
andryyy over 5 years ago 0165c9d

[Web] Show fuzzy hash of rejected mail, if any

Full commit hash
0165c9d26b71b696a848ca1145e105b6a66b55c0
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
126
    // Get fuzzy hashes
Open commit View diff
126 // Get fuzzy hashes
same change 0165c9d

[Web] Show fuzzy hash of rejected mail, if any

Full commit hash
0165c9d26b71b696a848ca1145e105b6a66b55c0
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
127
    $data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
Open commit View diff
127 $data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
128
    // Get text/plain content
Open commit View diff
128 // Get text/plain content
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
129
    $data['text_plain'] = $mail_parser->getMessageBody('text');
Open commit View diff
129 $data['text_plain'] = $mail_parser->getMessageBody('text');
FreddleSpl0it over 3 years ago 1e08b4e

fix encoding failures of parsed text_plain mail

Full commit hash
1e08b4ece62f28179912738afc39f6e86b8bbc5b
Author
FreddleSpl0it <[email protected]>
Date
over 3 years ago
Selected line
130
    if (!json_encode($data['text_plain'])) $data['text_plain'] = '';
Open commit View diff
130 if (!json_encode($data['text_plain'])) $data['text_plain'] = '';
andre.peters over 8 years ago 79cb929

[Web] Add html2text converter; Show quarantaine html elements as text, do not escape html

Full commit hash
79cb9299119cf613e9bbfe714c540cc8b4b90365
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
131
    // Get html content and convert to text
Open commit View diff
131 // Get html content and convert to text
same change 79cb929

[Web] Add html2text converter; Show quarantaine html elements as text, do not escape html

Full commit hash
79cb9299119cf613e9bbfe714c540cc8b4b90365
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
132
    $data['text_html'] = $html2text->convert($mail_parser->getMessageBody('html'));
Open commit View diff
132 $data['text_html'] = $html2text->convert($mail_parser->getMessageBody('html'));
André almost 8 years ago b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
133
    if (empty($data['text_plain']) && empty($data['text_html'])) {
Open commit View diff
133 if (empty($data['text_plain']) && empty($data['text_html'])) {
same change b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
134
      // Failed to parse content, try raw
Open commit View diff
134 // Failed to parse content, try raw
same change b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
135
      $text = trim(substr($mailc['msg'], strpos($mailc['msg'], "\r\n\r\n") + 1));
Open commit View diff
135 $text = trim(substr($mailc['msg'], strpos($mailc['msg'], "\r\n\r\n") + 1));
same change b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
136
      // Only return html->text
Open commit View diff
136 // Only return html->text
same change b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
137
      $data['text_plain'] = 'Parser failed, assuming HTML';
Open commit View diff
137 $data['text_plain'] = 'Parser failed, assuming HTML';
same change b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
138
      $data['text_html'] = $html2text->convert($text);
Open commit View diff
138 $data['text_html'] = $html2text->convert($text);
same change b8fe3f5

[Web] Fall back to raw content when mail parsing fails, fixes #1892

Full commit hash
b8fe3f5fd48083149a0bda46a35374c5b8662ba8
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
139
    }
Open commit View diff
139 }
andre.peters over 8 years ago 79cb929

[Web] Add html2text converter; Show quarantaine html elements as text, do not escape html

Full commit hash
79cb9299119cf613e9bbfe714c540cc8b4b90365
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
140
    (empty($data['text_plain'])) ? $data['text_plain'] = '-' : null;
Open commit View diff
140 (empty($data['text_plain'])) ? $data['text_plain'] = '-' : null;
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
141
    // Get subject
Open commit View diff
141 // Get subject
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
142
    $data['subject'] = $mail_parser->getHeader('subject');
Open commit View diff
142 $data['subject'] = $mail_parser->getHeader('subject');
andryyy over 5 years ago da3fc31

[Web] Fix Rspamd symbols in quarantine overview

Full commit hash
da3fc31500bb52657476c29e170d3207c7c636cf
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
143
    $data['subject'] = mb_convert_encoding($mail_parser->getHeader('subject'), "UTF-8", "auto");
Open commit View diff
143 $data['subject'] = mb_convert_encoding($mail_parser->getHeader('subject'), "UTF-8", "auto");
andre.peters over 8 years ago 79cb929

[Web] Add html2text converter; Show quarantaine html elements as text, do not escape html

Full commit hash
79cb9299119cf613e9bbfe714c540cc8b4b90365
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
144
    (empty($data['subject'])) ? $data['subject'] = '-' : null;
Open commit View diff
144 (empty($data['subject'])) ? $data['subject'] = '-' : null;
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
145
    // Get attachments
Open commit View diff
145 // Get attachments
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
146
    if (is_dir($tmpdir)) {
Open commit View diff
146 if (is_dir($tmpdir)) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
147
      rrmdir($tmpdir);
Open commit View diff
147 rrmdir($tmpdir);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
148
    }
Open commit View diff
148 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
149
    mkdir('/tmp/' . $_GET['id']);
Open commit View diff
149 mkdir('/tmp/' . $_GET['id']);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
150
    $mail_parser->saveAttachments($tmpdir, true);
Open commit View diff
150 $mail_parser->saveAttachments($tmpdir, true);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
151
    $atts = $mail_parser->getAttachments(true);
Open commit View diff
151 $atts = $mail_parser->getAttachments(true);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
152
    if (count($atts) > 0) {
Open commit View diff
152 if (count($atts) > 0) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
153
      foreach ($atts as $key => $val) {
Open commit View diff
153 foreach ($atts as $key => $val) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
154
        $data['attachments'][$key] = array(
Open commit View diff
154 $data['attachments'][$key] = array(
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
155
          // Index
Open commit View diff
155 // Index
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
156
          // 0 => file name
Open commit View diff
156 // 0 => file name
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
157
          // 1 => mime type
Open commit View diff
157 // 1 => mime type
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
158
          // 2 => file size
Open commit View diff
158 // 2 => file size
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
159
          // 3 => vt link by sha256
Open commit View diff
159 // 3 => vt link by sha256
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
160
          $val->getFilename(),
Open commit View diff
160 $val->getFilename(),
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
161
          $val->getContentType(),
Open commit View diff
161 $val->getContentType(),
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
162
          filesize($tmpdir . $val->getFilename()),
Open commit View diff
162 filesize($tmpdir . $val->getFilename()),
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
163
          'https://www.virustotal.com/file/' . hash_file('SHA256', $tmpdir . $val->getFilename()) . '/analysis/'
Open commit View diff
163 'https://www.virustotal.com/file/' . hash_file('SHA256', $tmpdir . $val->getFilename()) . '/analysis/'
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
164
        );
Open commit View diff
164 );
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
165
      }
Open commit View diff
165 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
166
    }
Open commit View diff
166 }
friedPotat0 almost 7 years ago 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
167
    if (isset($_GET['eml'])) {
Open commit View diff
167 if (isset($_GET['eml'])) {
andryyy about 6 years ago 667bd48

[Web] Update libs

Full commit hash
667bd4816321b2c853a25d25555c4440f482ab07
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
168
      $dl_filename = filter_var($data['subject'], FILTER_SANITIZE_STRING);
Open commit View diff
168 $dl_filename = filter_var($data['subject'], FILTER_SANITIZE_STRING);
andryyy about 6 years ago 24bbfb2

[Web] Shorten and sanitize downloaded file names, fixes too long file names in Firefox

Full commit hash
24bbfb23309f7110448feab6c5c36e39d24edbb7
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
169
      $dl_filename = strlen($dl_filename) > 30 ? substr($dl_filename,0,30) : $dl_filename;
Open commit View diff
169 $dl_filename = strlen($dl_filename) > 30 ? substr($dl_filename,0,30) : $dl_filename;
friedPotat0 almost 7 years ago 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
170
      header('Pragma: public');
Open commit View diff
170 header('Pragma: public');
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
171
      header('Expires: 0');
Open commit View diff
171 header('Expires: 0');
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
172
      header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
Open commit View diff
172 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
173
      header('Cache-Control: private', false);
Open commit View diff
173 header('Cache-Control: private', false);
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
174
      header('Content-Type: message/rfc822');
Open commit View diff
174 header('Content-Type: message/rfc822');
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
175
      header('Content-Disposition: attachment; filename="'. $dl_filename . '.eml";');
Open commit View diff
175 header('Content-Disposition: attachment; filename="'. $dl_filename . '.eml";');
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
176
      header('Content-Transfer-Encoding: binary');
Open commit View diff
176 header('Content-Transfer-Encoding: binary');
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
177
      header('Content-Length: ' . strlen($mailc['msg']));
Open commit View diff
177 header('Content-Length: ' . strlen($mailc['msg']));
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
178
      echo $mailc['msg'];
Open commit View diff
178 echo $mailc['msg'];
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
179
      exit;
Open commit View diff
179 exit;
same change 6fc32e8

Add option to download quarantine item as eml

Full commit hash
6fc32e8e526f33a386420604378490dce0d79ec5
Author
friedPotat0 <[email protected]>
Date
almost 7 years ago
Selected line
180
    }
Open commit View diff
180 }
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
181
    if (isset($_GET['att'])) {
Open commit View diff
181 if (isset($_GET['att'])) {
andryyy over 7 years ago 07392b7

[Watchdog] Use stackoverflow.com for DNS check

Full commit hash
07392b7437cddbbe937c259bc91bbb1267c93ca2
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
182
      if ($_SESSION['acl']['quarantine_attachments'] == 0) {
Open commit View diff
182 if ($_SESSION['acl']['quarantine_attachments'] == 0) {
same change 07392b7

[Watchdog] Use stackoverflow.com for DNS check

Full commit hash
07392b7437cddbbe937c259bc91bbb1267c93ca2
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
183
        exit(json_encode('Forbidden'));
Open commit View diff
183 exit(json_encode('Forbidden'));
same change 07392b7

[Watchdog] Use stackoverflow.com for DNS check

Full commit hash
07392b7437cddbbe937c259bc91bbb1267c93ca2
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
184
      }
Open commit View diff
184 }
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
185
      $dl_id = intval($_GET['att']);
Open commit View diff
185 $dl_id = intval($_GET['att']);
andryyy about 6 years ago 667bd48

[Web] Update libs

Full commit hash
667bd4816321b2c853a25d25555c4440f482ab07
Author
andryyy <[email protected]>
Date
about 6 years ago
Selected line
186
      $dl_filename = filter_var($data['attachments'][$dl_id][0], FILTER_SANITIZE_STRING);
Open commit View diff
186 $dl_filename = filter_var($data['attachments'][$dl_id][0], FILTER_SANITIZE_STRING);
andryyy over 5 years ago 75da1c6

[Web] Fix attachment download, thanks to Drago

Full commit hash
75da1c6f20daa14068e64825a8ca2847c8d24626
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
187
      $dl_filename_short = strlen($dl_filename) > 20 ? substr($dl_filename, 0, 20) : $dl_filename;
Open commit View diff
187 $dl_filename_short = strlen($dl_filename) > 20 ? substr($dl_filename, 0, 20) : $dl_filename;
same change 75da1c6

[Web] Fix attachment download, thanks to Drago

Full commit hash
75da1c6f20daa14068e64825a8ca2847c8d24626
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
188
      $dl_filename_extension = pathinfo($tmpdir . $dl_filename)['extension'];
Open commit View diff
188 $dl_filename_extension = pathinfo($tmpdir . $dl_filename)['extension'];
andryyy over 5 years ago e676617

[Web] Fix duplicate file extension on shortened filenames

Full commit hash
e676617f00d9c03c0f500776760a2fcc44e0e67d
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
189
      $dl_filename_short = preg_replace('/\.' . $dl_filename_extension . '$/', '', $dl_filename_short);
Open commit View diff
189 $dl_filename_short = preg_replace('/\.' . $dl_filename_extension . '$/', '', $dl_filename_short);
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
190
      if (!is_dir($tmpdir . $dl_filename) && file_exists($tmpdir . $dl_filename)) {
Open commit View diff
190 if (!is_dir($tmpdir . $dl_filename) && file_exists($tmpdir . $dl_filename)) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
191
        header('Pragma: public');
Open commit View diff
191 header('Pragma: public');
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
192
        header('Expires: 0');
Open commit View diff
192 header('Expires: 0');
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
193
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
Open commit View diff
193 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
194
        header('Cache-Control: private', false);
Open commit View diff
194 header('Cache-Control: private', false);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
195
        header('Content-Type: ' . $data['attachments'][$dl_id][1]);
Open commit View diff
195 header('Content-Type: ' . $data['attachments'][$dl_id][1]);
andryyy over 5 years ago 75da1c6

[Web] Fix attachment download, thanks to Drago

Full commit hash
75da1c6f20daa14068e64825a8ca2847c8d24626
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
196
        header('Content-Disposition: attachment; filename="'. $dl_filename_short . '.' . $dl_filename_extension . '";');
Open commit View diff
196 header('Content-Disposition: attachment; filename="'. $dl_filename_short . '.' . $dl_filename_extension . '";');
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
197
        header('Content-Transfer-Encoding: binary');
Open commit View diff
197 header('Content-Transfer-Encoding: binary');
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
198
        header('Content-Length: ' . $data['attachments'][$dl_id][2]);
Open commit View diff
198 header('Content-Length: ' . $data['attachments'][$dl_id][2]);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
199
        readfile($tmpdir . $dl_filename);
Open commit View diff
199 readfile($tmpdir . $dl_filename);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
200
        exit;
Open commit View diff
200 exit;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
201
      }
Open commit View diff
201 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
202
    }
Open commit View diff
202 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
203
    echo json_encode($data);
Open commit View diff
203 echo json_encode($data);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
204
  }
Open commit View diff
204 }
andryyy over 5 years ago 6d56ef6

[Web] Fix invalid encodings with json_encode, fixes #3847

Full commit hash
6d56ef6435c3f597d1d2230844fff4617789a699
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
205
Open commit View diff
205
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
206
}
Open commit View diff
206 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
207
?>
Open commit View diff
207 ?>