public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
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/spf.inc.php
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
spf.inc.php
on main
Author
Date
Commit
Line
Code
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 1
<?php
<?php
andryyy
about 9 years ago
74359f6
Use Redis for forwarded_hosts, some fixes
- Full commit hash
74359f6df4f2200ed11223ba911e6683cd963b0d- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 2
error_reporting(0);
error_reporting(0);
andryyy
over 5 years ago
06c89ba
[Web] Implement XMPP
- Full commit hash
06c89bac7deec007fbc5703bb8973f4da2176846- Author
- andryyy <[email protected]>
- Date
- over 5 years ago
- Selected line
- 3
function get_spf_allowed_hosts($check_domain, $expand_ipv6 = false) {
function get_spf_allowed_hosts($check_domain, $expand_ipv6 = false) {
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 4
$hosts = array();
$hosts = array();
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 5
andryyy
almost 7 years ago
692614f
[Web] Fix loop in SPF lookup
- Full commit hash
692614f79eee958d933f0f89e6d0e52b79a41ea2- Author
- andryyy <[email protected]>
- Date
- almost 7 years ago
- Selected line
- 6
$records = dns_get_record($check_domain, DNS_TXT);
$records = dns_get_record($check_domain, DNS_TXT);
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 7
foreach ($records as $record)
foreach ($records as $record)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 8
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 9
$txt = explode(' ', $record['entries'][0]);
$txt = explode(' ', $record['entries'][0]);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 10
if (array_shift($txt) != 'v=spf1') // only handle SPF records
if (array_shift($txt) != 'v=spf1') // only handle SPF records
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 11
continue;
continue;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 12
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 13
foreach ($txt as $mech)
foreach ($txt as $mech)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 14
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 15
$qual = substr($mech, 0, 1);
$qual = substr($mech, 0, 1);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 16
if ($qual == '-' || $qual == '~') // only handle pass or neutral records
if ($qual == '-' || $qual == '~') // only handle pass or neutral records
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 17
continue(2);
continue(2);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 18
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 19
if ($qual == '+' || $qual == '?')
if ($qual == '+' || $qual == '?')
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 20
$mech = substr($mech, 1); // remove the qualifier
$mech = substr($mech, 1); // remove the qualifier
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 21
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 22
if (strpos($mech, '=') !== FALSE) // handle a modifier
if (strpos($mech, '=') !== FALSE) // handle a modifier
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 23
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 24
$mod = explode('=', $mech);
$mod = explode('=', $mech);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 25
if ($mod[0] == 'redirect') // handle a redirect
if ($mod[0] == 'redirect') // handle a redirect
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 26
{
{
Sven Michels
about 5 years ago
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 27
$hosts = get_spf_allowed_hosts($mod[1],true);
$hosts = get_spf_allowed_hosts($mod[1],true);
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 28
return $hosts;
return $hosts;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 29
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 30
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 31
else
else
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 32
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 33
unset($cidr);
unset($cidr);
andryyy
about 6 years ago
b6933fd
[Web] Improve SPF checks
- Full commit hash
b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0- Author
- andryyy <[email protected]>
- Date
- about 6 years ago
- Selected line
- 34
// reset domain to check_domain
// reset domain to check_domain
same change
b6933fd
[Web] Improve SPF checks
- Full commit hash
b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0- Author
- andryyy <[email protected]>
- Date
- about 6 years ago
- Selected line
- 35
$domain = $check_domain;
$domain = $check_domain;
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 36
if (strpos($mech, ':') !== FALSE) // handle a domain specification
if (strpos($mech, ':') !== FALSE) // handle a domain specification
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 37
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 38
$split = explode(':', $mech);
$split = explode(':', $mech);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 39
$mech = array_shift($split);
$mech = array_shift($split);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 40
$domain = implode(':', $split);
$domain = implode(':', $split);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 41
if (strpos($domain, '/') !== FALSE) // remove CIDR specification
if (strpos($domain, '/') !== FALSE) // remove CIDR specification
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 42
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 43
$split = explode('/', $domain);
$split = explode('/', $domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 44
$domain = $split[0];
$domain = $split[0];
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 45
$cidr = $split[1];
$cidr = $split[1];
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 46
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 47
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 48
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 49
$new_hosts = array();
$new_hosts = array();
andryyy
almost 7 years ago
692614f
[Web] Fix loop in SPF lookup
- Full commit hash
692614f79eee958d933f0f89e6d0e52b79a41ea2- Author
- andryyy <[email protected]>
- Date
- almost 7 years ago
- Selected line
- 50
if ($mech == 'include' && $check_domain != $domain) // handle an inclusion
if ($mech == 'include' && $check_domain != $domain) // handle an inclusion
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 51
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 52
$new_hosts = get_spf_allowed_hosts($domain);
$new_hosts = get_spf_allowed_hosts($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 53
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 54
elseif ($mech == 'a') // handle a mechanism
elseif ($mech == 'a') // handle a mechanism
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 55
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 56
$new_hosts = get_a_hosts($domain);
$new_hosts = get_a_hosts($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 57
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 58
elseif ($mech == 'mx') // handle mx mechanism
elseif ($mech == 'mx') // handle mx mechanism
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 59
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 60
$new_hosts = get_mx_hosts($domain);
$new_hosts = get_mx_hosts($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 61
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 62
elseif ($mech == 'ip4' || $mech == 'ip6') // handle ip mechanism
elseif ($mech == 'ip4' || $mech == 'ip6') // handle ip mechanism
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 63
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 64
$new_hosts = array($domain);
$new_hosts = array($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 65
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 66
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 67
if (isset($cidr)) // add CIDR specification if present
if (isset($cidr)) // add CIDR specification if present
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 68
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 69
foreach ($new_hosts as &$host)
foreach ($new_hosts as &$host)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 70
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 71
$host .= '/' . $cidr;
$host .= '/' . $cidr;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 72
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 73
unset($host);
unset($host);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 74
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 75
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 76
$hosts = array_unique(array_merge($hosts,$new_hosts), SORT_REGULAR);
$hosts = array_unique(array_merge($hosts,$new_hosts), SORT_REGULAR);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 77
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 78
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 79
}
}
andryyy
about 6 years ago
b6933fd
[Web] Improve SPF checks
- Full commit hash
b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0- Author
- andryyy <[email protected]>
- Date
- about 6 years ago
- Selected line
- 80
foreach ($hosts as &$host) {
foreach ($hosts as &$host) {
same change
b6933fd
[Web] Improve SPF checks
- Full commit hash
b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0- Author
- andryyy <[email protected]>
- Date
- about 6 years ago
- Selected line
- 81
if (filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
if (filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
Sven Michels
about 5 years ago
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 82
if ($expand_ipv6 === true) {
if ($expand_ipv6 === true) {
same change
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 83
$hex = unpack("H*hex", inet_pton($host));
$hex = unpack("H*hex", inet_pton($host));
same change
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 84
$host = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex['hex']), 0, -1);
$host = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex['hex']), 0, -1);
same change
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 85
}
}
same change
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 86
else {
else {
same change
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 87
$host = $host;
$host = $host;
same change
b39ac8f
[Web] Fix: spf record validation failed with redirect
- Full commit hash
b39ac8f649d95e8ca23e88ef216cd72a245dcc2b- Author
- Sven Michels <[email protected]>
- Date
- about 5 years ago
- Selected line
- 88
}
}
andryyy
about 6 years ago
b6933fd
[Web] Improve SPF checks
- Full commit hash
b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0- Author
- andryyy <[email protected]>
- Date
- about 6 years ago
- Selected line
- 89
}
}
same change
b6933fd
[Web] Improve SPF checks
- Full commit hash
b6933fdb964f230cfdd6937d6d51aeb9ec2f7cc0- Author
- andryyy <[email protected]>
- Date
- about 6 years ago
- Selected line
- 90
}
}
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 91
return $hosts;
return $hosts;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 92
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 93
andryyy
about 9 years ago
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 94
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 95
function get_mx_hosts($domain)
function get_mx_hosts($domain)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 96
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 97
$hosts = array();
$hosts = array();
andryyy
about 9 years ago
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 98
try {
try {
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 99
$mx_records = dns_get_record($domain, DNS_MX);
$mx_records = dns_get_record($domain, DNS_MX);
andryyy
about 9 years ago
74359f6
Use Redis for forwarded_hosts, some fixes
- Full commit hash
74359f6df4f2200ed11223ba911e6683cd963b0d- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 100
if ($mx_records) {
if ($mx_records) {
same change
74359f6
Use Redis for forwarded_hosts, some fixes
- Full commit hash
74359f6df4f2200ed11223ba911e6683cd963b0d- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 101
foreach ($mx_records as $mx_record) {
foreach ($mx_records as $mx_record) {
same change
74359f6
Use Redis for forwarded_hosts, some fixes
- Full commit hash
74359f6df4f2200ed11223ba911e6683cd963b0d- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 102
$new_hosts = get_a_hosts($mx_record['target']);
$new_hosts = get_a_hosts($mx_record['target']);
same change
74359f6
Use Redis for forwarded_hosts, some fixes
- Full commit hash
74359f6df4f2200ed11223ba911e6683cd963b0d- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 103
$hosts = array_unique(array_merge($hosts,$new_hosts), SORT_REGULAR);
$hosts = array_unique(array_merge($hosts,$new_hosts), SORT_REGULAR);
same change
74359f6
Use Redis for forwarded_hosts, some fixes
- Full commit hash
74359f6df4f2200ed11223ba911e6683cd963b0d- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 104
}
}
andryyy
about 9 years ago
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 105
}
}
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 106
}
}
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 107
catch (Exception $e) {
catch (Exception $e) {
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 108
if ($e->getMessage() !== 'dns_get_record(): A temporary server error occurred.') {
if ($e->getMessage() !== 'dns_get_record(): A temporary server error occurred.') {
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 109
throw $e;
throw $e;
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 110
}
}
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 111
$mx_records = false;
$mx_records = false;
same change
f77c40a
Better log table, some MySQL to Redis migrations, API changes, other minor changes...
- Full commit hash
f77c40a179bb89b463318c6dafe4823a5844a43f- Author
- andryyy <[email protected]>
- Date
- about 9 years ago
- Selected line
- 112
}
}
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 113
return $hosts;
return $hosts;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 114
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 115
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 116
function get_a_hosts($domain)
function get_a_hosts($domain)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 117
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 118
$hosts = array();
$hosts = array();
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 119
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 120
$a_records = dns_get_record($domain, DNS_A);
$a_records = dns_get_record($domain, DNS_A);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 121
foreach ($a_records as $a_record)
foreach ($a_records as $a_record)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 122
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 123
$hosts[] = $a_record['ip'];
$hosts[] = $a_record['ip'];
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 124
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 125
$a_records = dns_get_record($domain, DNS_AAAA);
$a_records = dns_get_record($domain, DNS_AAAA);
andryyy
over 5 years ago
06c89ba
[Web] Implement XMPP
- Full commit hash
06c89bac7deec007fbc5703bb8973f4da2176846- Author
- andryyy <[email protected]>
- Date
- over 5 years ago
- Selected line
- 126
foreach ($a_records as $a_record) {
foreach ($a_records as $a_record) {
same change
06c89ba
[Web] Implement XMPP
- Full commit hash
06c89bac7deec007fbc5703bb8973f4da2176846- Author
- andryyy <[email protected]>
- Date
- over 5 years ago
- Selected line
- 127
$hosts[] = $a_record['ipv6'];
$hosts[] = $a_record['ipv6'];
Michael Kuron
over 9 years ago
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 128
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 129
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 130
return $hosts;
return $hosts;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 131
}
}
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 132
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 133
function get_outgoing_hosts_best_guess($domain)
function get_outgoing_hosts_best_guess($domain)
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 134
{
{
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 135
// try the SPF record to get hosts that are allowed to send outgoing mails for this domain
// try the SPF record to get hosts that are allowed to send outgoing mails for this domain
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 136
$hosts = get_spf_allowed_hosts($domain);
$hosts = get_spf_allowed_hosts($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 137
if ($hosts) return $hosts;
if ($hosts) return $hosts;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 138
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 139
// try the MX record to get mail servers for this domain
// try the MX record to get mail servers for this domain
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 140
$hosts = get_mx_hosts($domain);
$hosts = get_mx_hosts($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 141
if ($hosts) return $hosts;
if ($hosts) return $hosts;
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 142
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 143
// fall back to the A record to get the host name for this domain
// fall back to the A record to get the host name for this domain
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 144
return get_a_hosts($domain);
return get_a_hosts($domain);
same change
df71e97
Forwarding hosts: use SPF records if present
- Full commit hash
df71e97a09fa9b90b4766875ee20f9ba2345bcc3- Author
- Michael Kuron <[email protected]>
- Date
- over 9 years ago
- Selected line
- 145
}
}
andryyy
almost 7 years ago
692614f
[Web] Fix loop in SPF lookup
- Full commit hash
692614f79eee958d933f0f89e6d0e52b79a41ea2- Author
- andryyy <[email protected]>
- Date
- almost 7 years ago
- Selected line
- 146
?>
?>