mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-06 02:28:56 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user