Remove technical subdomains from MTA-STS policies and TLS records (closes #429)
This commit is contained in:
@@ -308,11 +308,13 @@ impl Policy {
|
|||||||
|
|
||||||
impl Core {
|
impl Core {
|
||||||
pub fn build_mta_sts_policy(&self) -> Option<Policy> {
|
pub fn build_mta_sts_policy(&self) -> Option<Policy> {
|
||||||
self.smtp
|
self.smtp.session.mta_sts_policy.clone().and_then(|policy| {
|
||||||
.session
|
policy.try_build(self.tls.certificates.load().keys().filter(|key| {
|
||||||
.mta_sts_policy
|
!key.starts_with("mta-sts.")
|
||||||
.clone()
|
&& !key.starts_with("autoconfig.")
|
||||||
.and_then(|policy| policy.try_build(self.tls.certificates.load().keys()))
|
&& !key.starts_with("autodiscover.")
|
||||||
|
}))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,11 @@ impl JMAP {
|
|||||||
|
|
||||||
// Add TLSA records
|
// Add TLSA records
|
||||||
for (name, key) in self.core.tls.certificates.load().iter() {
|
for (name, key) in self.core.tls.certificates.load().iter() {
|
||||||
if !name.ends_with(domain_name) {
|
if !name.ends_with(domain_name)
|
||||||
|
|| name.starts_with("mta-sts.")
|
||||||
|
|| name.starts_with("autoconfig.")
|
||||||
|
|| name.starts_with("autodiscover.")
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user