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
Commit
[Web] Fix loop in SPF lookup
692614f7
data/web/inc/spf.inc.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Diff
diff --git a/data/web/inc/spf.inc.php b/data/web/inc/spf.inc.php
index 18dd2893..ddb9d48c 100644
--- a/data/web/inc/spf.inc.php
+++ b/data/web/inc/spf.inc.php
@@ -1,11 +1,11 @@
<?php
error_reporting(0);
-function get_spf_allowed_hosts($domain)
+function get_spf_allowed_hosts($check_domain)
{
$hosts = array();
- $records = dns_get_record($domain, DNS_TXT);
+ $records = dns_get_record($check_domain, DNS_TXT);
foreach ($records as $record)
{
$txt = explode(' ', $record['entries'][0]);
@@ -47,7 +47,7 @@ function get_spf_allowed_hosts($domain)
}
$new_hosts = array();
- if ($mech == 'include') // handle an inclusion
+ if ($mech == 'include' && $check_domain != $domain) // handle an inclusion
{
$new_hosts = get_spf_allowed_hosts($domain);
}
@@ -134,4 +134,4 @@ function get_outgoing_hosts_best_guess($domain)
// fall back to the A record to get the host name for this domain
return get_a_hosts($domain);
}
-?>
\ No newline at end of file
+?>