Import upstream v0.16.24, stripped

Upstream commit: af37a234981722493b74623a983581691d2b70b6
Enterprise-only files removed or emptied: 63
Enterprise-only snippets removed: 118 in 50 files
Dangling module declarations removed: 5
Edits turning enterprise off: 25
Third-party code: 14 files, 0 not in THIRD-PARTY.md
Renamed identifiers: 62 in 18 files
Verification: clean

The same Enterprise footprint as v0.16.23. The build check fails only on
tests/src/directory/issuer.rs, unchanged since v0.16.23: it calls a helper
from upstream's Enterprise-only OIDC test, and tests issuer-based directory
routing, an Enterprise feature. main has never carried it.
This commit is contained in:
2026-09-28 06:29:38 -07:00
parent 3a272096c0
commit f59b084ce5
98 changed files with 2851 additions and 1068 deletions
+192 -13
View File
@@ -10557,6 +10557,7 @@ impl ObjectImpl for DnsServer {
DnsServer::Vultr(inner) => inner.validate(errors),
DnsServer::WebSupport(inner) => inner.validate(errors),
DnsServer::YandexCloud(inner) => inner.validate(errors),
DnsServer::PowerDns(inner) => inner.validate(errors),
}
}
@@ -10770,6 +10771,9 @@ impl ObjectImpl for DnsServer {
DnsServer::YandexCloud(object) => {
object.index(i);
}
DnsServer::PowerDns(object) => {
object.index(i);
}
}
}
}
@@ -11062,6 +11066,10 @@ impl Pickle for DnsServer {
69u16.pickle(out);
inner.pickle(out);
}
DnsServer::PowerDns(inner) => {
70u16.pickle(out);
inner.pickle(out);
}
}
}
@@ -11137,6 +11145,7 @@ impl Pickle for DnsServer {
67 => Pickle::unpickle(stream).map(DnsServer::Vultr),
68 => Pickle::unpickle(stream).map(DnsServer::WebSupport),
69 => Pickle::unpickle(stream).map(DnsServer::YandexCloud),
70 => Pickle::unpickle(stream).map(DnsServer::PowerDns),
_ => None,
}
}
@@ -11633,6 +11642,13 @@ impl IntoValue for DnsServer {
.insert_unchecked(Property::Type, JmapValue::Str("YandexCloud".into()));
obj
}
DnsServer::PowerDns(obj) => {
let mut obj = obj.into_value();
obj.as_object_mut()
.unwrap()
.insert_unchecked(Property::Type, JmapValue::Str("PowerDns".into()));
obj
}
}
}
}
@@ -11717,6 +11733,7 @@ impl RegistryJsonPatch for DnsServer {
DnsServerType::Vultr => *self = DnsServer::Vultr(Default::default()),
DnsServerType::WebSupport => *self = DnsServer::WebSupport(Default::default()),
DnsServerType::YandexCloud => *self = DnsServer::YandexCloud(Default::default()),
DnsServerType::PowerDns => *self = DnsServer::PowerDns(Default::default()),
}
}
match self {
@@ -11790,6 +11807,7 @@ impl RegistryJsonPatch for DnsServer {
DnsServer::Vultr(inner) => inner.patch(pointer, value),
DnsServer::WebSupport(inner) => inner.patch(pointer, value),
DnsServer::YandexCloud(inner) => inner.patch(pointer, value),
DnsServer::PowerDns(inner) => inner.patch(pointer, value),
}
}
}
@@ -11867,6 +11885,7 @@ impl DnsServer {
DnsServer::Vultr(_) => DnsServerType::Vultr,
DnsServer::WebSupport(_) => DnsServerType::WebSupport,
DnsServer::YandexCloud(_) => DnsServerType::YandexCloud,
DnsServer::PowerDns(_) => DnsServerType::PowerDns,
}
}
}
@@ -12702,6 +12721,7 @@ impl DnsServerBootstrap {
DnsServerBootstrap::Vultr(inner) => inner.validate(errors),
DnsServerBootstrap::WebSupport(inner) => inner.validate(errors),
DnsServerBootstrap::YandexCloud(inner) => inner.validate(errors),
DnsServerBootstrap::PowerDns(inner) => inner.validate(errors),
}
}
}
@@ -12997,6 +13017,10 @@ impl Pickle for DnsServerBootstrap {
70u16.pickle(out);
inner.pickle(out);
}
DnsServerBootstrap::PowerDns(inner) => {
71u16.pickle(out);
inner.pickle(out);
}
}
}
@@ -13073,6 +13097,7 @@ impl Pickle for DnsServerBootstrap {
68 => Pickle::unpickle(stream).map(DnsServerBootstrap::Vultr),
69 => Pickle::unpickle(stream).map(DnsServerBootstrap::WebSupport),
70 => Pickle::unpickle(stream).map(DnsServerBootstrap::YandexCloud),
71 => Pickle::unpickle(stream).map(DnsServerBootstrap::PowerDns),
_ => None,
}
}
@@ -13574,6 +13599,13 @@ impl IntoValue for DnsServerBootstrap {
.insert_unchecked(Property::Type, JmapValue::Str("YandexCloud".into()));
obj
}
DnsServerBootstrap::PowerDns(obj) => {
let mut obj = obj.into_value();
obj.as_object_mut()
.unwrap()
.insert_unchecked(Property::Type, JmapValue::Str("PowerDns".into()));
obj
}
}
}
}
@@ -13791,6 +13823,9 @@ impl RegistryJsonPatch for DnsServerBootstrap {
DnsServerBootstrapType::YandexCloud => {
*self = DnsServerBootstrap::YandexCloud(Default::default())
}
DnsServerBootstrapType::PowerDns => {
*self = DnsServerBootstrap::PowerDns(Default::default())
}
}
}
match self {
@@ -13865,6 +13900,7 @@ impl RegistryJsonPatch for DnsServerBootstrap {
DnsServerBootstrap::Vultr(inner) => inner.patch(pointer, value),
DnsServerBootstrap::WebSupport(inner) => inner.patch(pointer, value),
DnsServerBootstrap::YandexCloud(inner) => inner.patch(pointer, value),
DnsServerBootstrap::PowerDns(inner) => inner.patch(pointer, value),
}
}
}
@@ -13943,6 +13979,7 @@ impl DnsServerBootstrap {
DnsServerBootstrap::Vultr(_) => DnsServerBootstrapType::Vultr,
DnsServerBootstrap::WebSupport(_) => DnsServerBootstrapType::WebSupport,
DnsServerBootstrap::YandexCloud(_) => DnsServerBootstrapType::YandexCloud,
DnsServerBootstrap::PowerDns(_) => DnsServerBootstrapType::PowerDns,
}
}
}
@@ -18226,6 +18263,148 @@ impl RegistryJsonPropertyPatch for DnsServerPorkbun {
}
}
impl DnsServerPowerDns {
fn validate(&self, errors: &mut Vec<ValidationError>) -> bool {
let neb = errors.len();
let value = &self.api_key;
value.validate(errors);
if let Some(value) = &self.endpoint {
if value.is_empty() {
errors.push(ValidationError::required(Property::Endpoint));
}
}
if let Some(value) = &self.server_id {
if value.is_empty() {
errors.push(ValidationError::required(Property::ServerId));
}
}
let value = &self.description;
if value.is_empty() {
errors.push(ValidationError::required(Property::Description));
}
if let Some(value) = &self.member_tenant_id {
if !value.is_valid() {
errors.push(ValidationError::required(Property::MemberTenantId));
}
}
errors.len() == neb
}
fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) {
i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None);
if let Some(value) = &self.member_tenant_id {
i.search(Property::MemberTenantId, value);
}
}
}
impl Pickle for DnsServerPowerDns {
fn pickle(&self, out: &mut Vec<u8>) {
self.api_key.pickle(out);
self.endpoint.pickle(out);
self.server_id.pickle(out);
self.description.pickle(out);
self.member_tenant_id.pickle(out);
self.timeout.pickle(out);
self.ttl.pickle(out);
self.polling_interval.pickle(out);
self.propagation_timeout.pickle(out);
self.propagation_delay.pickle(out);
}
fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option<Self> {
let mut this = Self::default();
this.api_key = Pickle::unpickle(stream)?;
this.endpoint = Pickle::unpickle(stream)?;
this.server_id = Pickle::unpickle(stream)?;
this.description = Pickle::unpickle(stream)?;
this.member_tenant_id = Pickle::unpickle(stream)?;
this.timeout = Pickle::unpickle(stream)?;
this.ttl = Pickle::unpickle(stream)?;
this.polling_interval = Pickle::unpickle(stream)?;
this.propagation_timeout = Pickle::unpickle(stream)?;
this.propagation_delay = Pickle::unpickle(stream)?;
Some(this)
}
}
impl Default for DnsServerPowerDns {
fn default() -> Self {
Self {
api_key: Default::default(),
endpoint: Default::default(),
server_id: Default::default(),
description: Default::default(),
member_tenant_id: Default::default(),
timeout: Duration::from_millis(30000),
ttl: Duration::from_millis(300000),
polling_interval: Duration::from_millis(15000),
propagation_timeout: Duration::from_millis(60000),
propagation_delay: Default::default(),
}
}
}
impl IntoValue for DnsServerPowerDns {
fn into_value(self) -> JmapValue<'static> {
let mut map = jmap_tools::Map::with_capacity(12);
map.insert_unchecked(Property::ApiKey, self.api_key.into_value());
map.insert_unchecked(Property::Endpoint, self.endpoint.into_value());
map.insert_unchecked(Property::ServerId, self.server_id.into_value());
map.insert_unchecked(Property::Description, self.description.into_value());
map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value());
map.insert_unchecked(Property::Timeout, self.timeout.into_value());
map.insert_unchecked(Property::Ttl, self.ttl.into_value());
map.insert_unchecked(
Property::PollingInterval,
self.polling_interval.into_value(),
);
map.insert_unchecked(
Property::PropagationTimeout,
self.propagation_timeout.into_value(),
);
map.insert_unchecked(
Property::PropagationDelay,
self.propagation_delay.into_value(),
);
JmapValue::Object(map)
}
}
impl RegistryJsonPropertyPatch for DnsServerPowerDns {
fn patch_property<'x>(
&mut self,
mut pointer: JsonPointerPatch<'_>,
value: JmapValue<'x>,
) -> PatchResult<'x> {
match pointer.next_property() {
Some(Property::ApiKey) => self.api_key.patch(pointer, value),
Some(Property::Endpoint) => self
.endpoint
.patch(pointer.with_validators(&[StringValidator::Trim]), value),
Some(Property::ServerId) => self
.server_id
.patch(pointer.with_validators(&[StringValidator::Trim]), value),
Some(Property::Description) => self
.description
.patch(pointer.with_validators(&[StringValidator::Trim]), value),
Some(Property::MemberTenantId) => self
.member_tenant_id
.patch(pointer.assert_can_set_tenant()?, value),
Some(Property::Timeout) => self.timeout.patch(pointer, value),
Some(Property::Ttl) => self.ttl.patch(pointer, value),
Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value),
Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value),
Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value),
Some(Property::Type) => Ok(MaybeUnpatched::Unpatched {
property: Property::Type,
value,
}),
_ => Err(PatchError::new(pointer, "Invalid property")),
}
}
}
impl DnsServerRoute53 {
fn validate(&self, errors: &mut Vec<ValidationError>) -> bool {
let neb = errors.len();
@@ -29620,8 +29799,8 @@ impl Default for MySqlSettings {
Self {
host: Default::default(),
port: 3306u64,
database: "stalwart".to_string(),
auth_username: Some("stalwart".to_string()),
database: "inbuxa".to_string(),
auth_username: Some("inbuxa".to_string()),
auth_secret: Default::default(),
}
}
@@ -29778,8 +29957,8 @@ impl Default for MySqlStore {
read_replicas: Default::default(),
host: Default::default(),
port: 3306u64,
database: "stalwart".to_string(),
auth_username: Some("stalwart".to_string()),
database: "inbuxa".to_string(),
auth_username: Some("inbuxa".to_string()),
auth_secret: Default::default(),
}
}
@@ -29940,7 +30119,7 @@ impl Default for NatsCoordinator {
no_echo: true,
use_tls: false,
auth_secret: Default::default(),
auth_username: Some("stalwart".to_string()),
auth_username: Some("inbuxa".to_string()),
credentials: Default::default(),
}
}
@@ -31122,8 +31301,8 @@ impl Default for PostgreSqlSettings {
Self {
host: Default::default(),
port: 5432u64,
database: "stalwart".to_string(),
auth_username: Some("stalwart".to_string()),
database: "inbuxa".to_string(),
auth_username: Some("inbuxa".to_string()),
auth_secret: Default::default(),
options: Default::default(),
}
@@ -31267,8 +31446,8 @@ impl Default for PostgreSqlStore {
read_replicas: Default::default(),
host: Default::default(),
port: 5432u64,
database: "stalwart".to_string(),
auth_username: Some("stalwart".to_string()),
database: "inbuxa".to_string(),
auth_username: Some("inbuxa".to_string()),
auth_secret: Default::default(),
options: Default::default(),
}
@@ -32573,7 +32752,7 @@ impl Default for RedisClusterStore {
Self {
urls: Map::new(vec!["redis://127.0.0.1".to_string()]),
timeout: Duration::from_millis(10000),
auth_username: Some("stalwart".to_string()),
auth_username: Some("inbuxa".to_string()),
auth_secret: Default::default(),
max_retry_wait: Default::default(),
min_retry_wait: Default::default(),
@@ -32740,7 +32919,7 @@ impl Default for RedisSentinelStore {
urls: Map::new(vec!["redis://127.0.0.1:26379".to_string()]),
service_name: "mymaster".to_string(),
timeout: Duration::from_millis(10000),
auth_username: Some("stalwart".to_string()),
auth_username: Some("inbuxa".to_string()),
auth_secret: Default::default(),
sentinel_username: Default::default(),
sentinel_secret: Default::default(),
@@ -40212,7 +40391,7 @@ impl Default for SpamSettings {
score_reject: Float::new(0.0f64),
score_spam: Float::new(5.0f64),
trust_replies: true,
spam_filter_rules_url: Some("https://github.com/stalwartlabs/spam-filter/releases/latest/download/spam-filter-rules.json.gz".to_string()),
spam_filter_rules_url: None,
}
}
}
@@ -46305,7 +46484,7 @@ impl Default for TracerLog {
fn default() -> Self {
Self {
path: Default::default(),
prefix: "stalwart".to_string(),
prefix: "inbuxa".to_string(),
rotate: LogRotateFrequency::Daily,
ansi: true,
multiline: false,