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/mta-sts.php

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

mta-sts.php on main
Author Date Commit Line Code
DerLinkman 11 months ago c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
2
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
Open commit View diff
2 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
3
Open commit View diff
3
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
4
if (!isset($_SERVER['HTTP_HOST']) || strpos($_SERVER['HTTP_HOST'], 'mta-sts.') !== 0) {
Open commit View diff
4 if (!isset($_SERVER['HTTP_HOST']) || strpos($_SERVER['HTTP_HOST'], 'mta-sts.') !== 0) {
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
5
  http_response_code(404);
Open commit View diff
5 http_response_code(404);
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
6
  exit;
Open commit View diff
6 exit;
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
7
}
Open commit View diff
7 }
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
8
Open commit View diff
8
FreddleSpl0it 10 months ago 4b2862c

[Web] Remove Port from HTTP_HOST

Full commit hash
4b2862cb3c2e8825620989aac42a735d16fe4313
Author
FreddleSpl0it <[email protected]>
Date
10 months ago
Selected line
9
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
Open commit View diff
9 $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
Copilot 7 months ago 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
10
$domain = idn_to_ascii(strtolower(str_replace('mta-sts.', '', $host)), 0, INTL_IDNA_VARIANT_UTS46);
Open commit View diff
10 $domain = idn_to_ascii(strtolower(str_replace('mta-sts.', '', $host)), 0, INTL_IDNA_VARIANT_UTS46);
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
11
Open commit View diff
11
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
12
// Validate domain or return 404 on error
Open commit View diff
12 // Validate domain or return 404 on error
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
13
if ($domain === false || empty($domain)) {
Open commit View diff
13 if ($domain === false || empty($domain)) {
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
14
  http_response_code(404);
Open commit View diff
14 http_response_code(404);
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
15
  exit;
Open commit View diff
15 exit;
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
16
}
Open commit View diff
16 }
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
17
Open commit View diff
17
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
18
// Check if domain is an alias domain and resolve to target domain
Open commit View diff
18 // Check if domain is an alias domain and resolve to target domain
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
19
try {
Open commit View diff
19 try {
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
20
  $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :domain");
Open commit View diff
20 $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :domain");
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
21
  $stmt->execute(array(':domain' => $domain));
Open commit View diff
21 $stmt->execute(array(':domain' => $domain));
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
22
  $alias_row = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
22 $alias_row = $stmt->fetch(PDO::FETCH_ASSOC);
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
23
  
Open commit View diff
23
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
24
  if ($alias_row !== false && !empty($alias_row['target_domain'])) {
Open commit View diff
24 if ($alias_row !== false && !empty($alias_row['target_domain'])) {
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
25
    // This is an alias domain, use the target domain for MTA-STS lookup
Open commit View diff
25 // This is an alias domain, use the target domain for MTA-STS lookup
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
26
    $domain = $alias_row['target_domain'];
Open commit View diff
26 $domain = $alias_row['target_domain'];
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
27
  }
Open commit View diff
27 }
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
28
} catch (PDOException $e) {
Open commit View diff
28 } catch (PDOException $e) {
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
29
  // On database error, return 404
Open commit View diff
29 // On database error, return 404
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
30
  http_response_code(404);
Open commit View diff
30 http_response_code(404);
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
31
  exit;
Open commit View diff
31 exit;
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
32
}
Open commit View diff
32 }
same change 038b2ef

Add MTA-STS support for alias domains (#6972)

Full commit hash
038b2efb759e6d011b35beee53e3e534d266341f
Author
Copilot <[email protected]>
Date
7 months ago
Selected line
33
Open commit View diff
33
DerLinkman 11 months ago c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
34
$mta_sts = mailbox('get', 'mta_sts', $domain);
Open commit View diff
34 $mta_sts = mailbox('get', 'mta_sts', $domain);
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
35
Open commit View diff
35
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
36
if (count($mta_sts) == 0 ||
Open commit View diff
36 if (count($mta_sts) == 0 ||
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
37
    !isset($mta_sts['version']) ||
Open commit View diff
37 !isset($mta_sts['version']) ||
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
38
    !isset($mta_sts['mode']) ||
Open commit View diff
38 !isset($mta_sts['mode']) ||
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
39
    !isset($mta_sts['max_age']) ||
Open commit View diff
39 !isset($mta_sts['max_age']) ||
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
40
    !isset($mta_sts['mx']) ||
Open commit View diff
40 !isset($mta_sts['mx']) ||
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
41
    $mta_sts['active'] != 1) {
Open commit View diff
41 $mta_sts['active'] != 1) {
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
42
  http_response_code(404);
Open commit View diff
42 http_response_code(404);
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
43
  exit;
Open commit View diff
43 exit;
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
44
}
Open commit View diff
44 }
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
45
Open commit View diff
45
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
46
header('Content-Type: text/plain; charset=utf-8');
Open commit View diff
46 header('Content-Type: text/plain; charset=utf-8');
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
47
echo "version: {$mta_sts['version']}\n";
Open commit View diff
47 echo "version: {$mta_sts['version']}\n";
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
48
echo "mode: {$mta_sts['mode']}\n";
Open commit View diff
48 echo "mode: {$mta_sts['mode']}\n";
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
49
echo "max_age: {$mta_sts['max_age']}\n";
Open commit View diff
49 echo "max_age: {$mta_sts['max_age']}\n";
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
50
foreach ($mta_sts['mx'] as $mx) {
Open commit View diff
50 foreach ($mta_sts['mx'] as $mx) {
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
51
  echo "mx: {$mx}\n";
Open commit View diff
51 echo "mx: {$mx}\n";
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
52
}
Open commit View diff
52 }
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
53
Open commit View diff
53
same change c39712a

pf/php: add mta-sts support (outbound) (#6686)

Full commit hash
c39712af671cc150595e6aadc7c31868eef14408
Author
DerLinkman <[email protected]>
Date
11 months ago
Selected line
54
?>
Open commit View diff
54 ?>