shaping: downgrade conflicting mx domains to a warning

The mail must flow!

However, it is unspecified which shaping rules we'll actually use in
that situation; the current effective order of resolution and behavior
must not be relied upon and may change without notice or anyone even
realizing that it changed.
This commit is contained in:
Wez Furlong
2023-08-21 06:25:09 -07:00
parent bd52d45c8e
commit 80bb116cb7
+3 -8
View File
@@ -425,19 +425,14 @@ impl Shaping {
if domains.len() > 1 {
let domains = domains.into_iter().collect::<Vec<_>>().join(", ");
warnings.push(format!(
"Multiple domains rollup to the same site: {site} -> {domains}"
"Multiple domains rollup to the same site: {site} -> {domains}. \
Actual shaping behavior for those domains will be unspecified. \
Resolve this by retaining the primary domain and removing the others."
));
conflicted.push(domains);
}
}
if !conflicted.is_empty() {
anyhow::bail!(
"Multiple conflicting rollup domains: {}",
conflicted.join(" ")
);
}
for (site, partial) in &by_site {
partial
.clone()