Skip to content

Commit

Permalink
fix 'show necessary dns entries for mail/antispan also in admin-view …
Browse files Browse the repository at this point in the history
…of domain' if bind is enabled but domain is not using nameserver

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Feb 5, 2025
1 parent b9baeb7 commit 606377f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/formfields/admin/domains/formfield.domains_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,19 +454,19 @@
'value' => $result['zonefile']
],
'spf_entry' => [
'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('spf.use_spf') == '1' && $result['isemaildomain'] == '1'),
'visible' => ($result['isbinddomain'] == '0' && Settings::Get('spf.use_spf') == '1' && $result['isemaildomain'] == '1'),
'label' => lng('antispam.required_spf_dns'),
'type' => 'longtext',
'value' => (string)(new \Froxlor\Dns\DnsEntry('@', 'TXT', \Froxlor\Dns\Dns::encloseTXTContent(Settings::Get('spf.spf_entry'))))
],
'dmarc_entry' => [
'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('dmarc.use_dmarc') == '1' && $result['isemaildomain'] == '1'),
'visible' => ($result['isbinddomain'] == '0' && Settings::Get('dmarc.use_dmarc') == '1' && $result['isemaildomain'] == '1'),
'label' => lng('antispam.required_dmarc_dns'),
'type' => 'longtext',
'value' => (string)(new \Froxlor\Dns\DnsEntry('_dmarc', 'TXT', \Froxlor\Dns\Dns::encloseTXTContent(Settings::Get('dmarc.dmarc_entry'))))
],
'dkim_entry' => [
'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('antispam.activated') == '1' && $result['dkim'] == '1' && $result['dkim_pubkey'] != ''),
'visible' => ($result['isbinddomain'] == '0' && Settings::Get('antispam.activated') == '1' && $result['dkim'] == '1' && $result['dkim_pubkey'] != ''),
'label' => lng('antispam.required_dkim_dns'),
'type' => 'longtext',
'value' => (string)(new \Froxlor\Dns\DnsEntry('dkim' . $result['dkim_id'] . '._domainkey', 'TXT', \Froxlor\Dns\Dns::encloseTXTContent('v=DKIM1; k=rsa; p='.trim($result['dkim_pubkey']))))
Expand Down

0 comments on commit 606377f

Please sign in to comment.