show required dns entries to admin and customer for a domain if nameserver-feature is not used
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -91,7 +91,7 @@ class SysLog extends ApiCommand implements ResourceEntity
|
|||||||
Database::pexecute($result_stmt, $query_fields, true, true);
|
Database::pexecute($result_stmt, $query_fields, true, true);
|
||||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
// clean log-text
|
// clean log-text
|
||||||
$row['text'] = preg_replace("/[^\w @#\"':.()\[\]+\-_\/\\\!]/i", "_", $row['text']);
|
$row['text'] = preg_replace("/[^\w @#\"':.,()\[\]+\-_\/\\\!]/i", "_", $row['text']);
|
||||||
$result[] = $row;
|
$result[] = $row;
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list log-entries");
|
$this->logger()->logAction($this->isAdmin() ? FroxlorLogger::ADM_ACTION : FroxlorLogger::USR_ACTION, LOG_INFO, "[API] list log-entries");
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ final class ConfigServices extends CliCommand
|
|||||||
'bullseye',
|
'bullseye',
|
||||||
'focal',
|
'focal',
|
||||||
'jammy',
|
'jammy',
|
||||||
|
'noble',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected function configure()
|
protected function configure()
|
||||||
|
|||||||
@@ -446,7 +446,25 @@ return [
|
|||||||
'desc' => lng('admin.bindzonewarning'),
|
'desc' => lng('admin.bindzonewarning'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'value' => $result['zonefile']
|
'value' => $result['zonefile']
|
||||||
]
|
],
|
||||||
|
'spf_entry' => [
|
||||||
|
'visible' => (Settings::Get('system.bind_enable') == '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'),
|
||||||
|
'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'] != ''),
|
||||||
|
'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']))))
|
||||||
|
],
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -116,6 +116,18 @@ return [
|
|||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'value' => '0'
|
'value' => '0'
|
||||||
],
|
],
|
||||||
|
'spf_entry' => [
|
||||||
|
'visible' => (Settings::Get('system.bind_enable') == '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'),
|
||||||
|
'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' => [
|
'dkim_entry' => [
|
||||||
'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('antispam.activated') == '1' && $result['dkim'] == '1' && $result['dkim_pubkey'] != ''),
|
'visible' => (Settings::Get('system.bind_enable') == '0' && Settings::Get('antispam.activated') == '1' && $result['dkim'] == '1' && $result['dkim_pubkey'] != ''),
|
||||||
'label' => lng('antispam.required_dkim_dns'),
|
'label' => lng('antispam.required_dkim_dns'),
|
||||||
|
|||||||
@@ -632,6 +632,8 @@ return [
|
|||||||
'title' => 'Verwende greylisting',
|
'title' => 'Verwende greylisting',
|
||||||
'description' => 'Eingehende E-Mails mittels <a href="https://de.wikipedia.org/wiki/Greylisting" target="_blank">Greylisting</a> schützen.<br/>Standard: Ja'
|
'description' => 'Eingehende E-Mails mittels <a href="https://de.wikipedia.org/wiki/Greylisting" target="_blank">Greylisting</a> schützen.<br/>Standard: Ja'
|
||||||
],
|
],
|
||||||
|
'required_spf_dns' => 'Erforderlicher SPF DNS Eintrag',
|
||||||
|
'required_dmarc_dns' => 'Erforderlicher DMARC DNS Eintrag',
|
||||||
'required_dkim_dns' => 'Erforderlicher DKIM DNS Eintrag',
|
'required_dkim_dns' => 'Erforderlicher DKIM DNS Eintrag',
|
||||||
],
|
],
|
||||||
'dns' => [
|
'dns' => [
|
||||||
|
|||||||
@@ -681,6 +681,8 @@ return [
|
|||||||
'title' => 'Use greylisting',
|
'title' => 'Use greylisting',
|
||||||
'description' => 'Incoming emails will be protected by <a href="https://en.wikipedia.org/wiki/Greylisting_(email)" target="_blank">greylisting</a>.<br/>Default: yes'
|
'description' => 'Incoming emails will be protected by <a href="https://en.wikipedia.org/wiki/Greylisting_(email)" target="_blank">greylisting</a>.<br/>Default: yes'
|
||||||
],
|
],
|
||||||
|
'required_spf_dns' => 'Required SPF DNS entry',
|
||||||
|
'required_dmarc_dns' => 'Required DMARC DNS entry',
|
||||||
'required_dkim_dns' => 'Required DKIM DNS entry',
|
'required_dkim_dns' => 'Required DKIM DNS entry',
|
||||||
],
|
],
|
||||||
'dns' => [
|
'dns' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user