Change storage to sqlite + filesystem

This commit is contained in:
Gonne 2025-01-12 21:30:11 +01:00
parent 188237a41d
commit a15b0ee5d6
2 changed files with 30 additions and 1 deletions

View file

@ -181,7 +181,7 @@ in {
"lookup.default.hostname" "lookup.default.hostname"
"certificate.*" "certificate.*"
] # the default ones ] # the default ones
++ ["sieve.trusted.*"]; #for macros to be able to include our redirection script ++ ["sieve.trusted.scripts.*"]; #for macros to be able to include our redirection script
sieve.trusted.scripts.redirects.contents = "%{file:/tmp/virt_aliases}%"; # generated redirect script sieve.trusted.scripts.redirects.contents = "%{file:/tmp/virt_aliases}%"; # generated redirect script
session.data.script = "'redirects'"; session.data.script = "'redirects'";
@ -190,6 +190,13 @@ in {
# see passwd on azathoth for plaintext or machine secret in encoded format for HTTP Basic AUTH # see passwd on azathoth for plaintext or machine secret in encoded format for HTTP Basic AUTH
secret = cfg.stalwartAdminHash; secret = cfg.stalwartAdminHash;
}; };
store = {
# structured data in SQLite, blobs on filesystem
db.type = "sqlite";
db.path = "/var/lib/stalwart-mail/data/index.sqlite3";
fs.type = "fs";
fs.path = "/var/lib/stalwart-mail/data/blobs";
};
}; };
}; };
}; };

22
sieve-rs.patch Normal file
View file

@ -0,0 +1,22 @@
diff --git a/src/runtime/actions/action_redirect.rs b/src/runtime/actions/action_redirect.rs
index 5b4599d..bfb46b0 100644
--- a/src/runtime/actions/action_redirect.rs
+++ b/src/runtime/actions/action_redirect.rs
@@ -41,17 +41,6 @@ impl Redirect {
.count()
< ctx.runtime.max_received_headers
{
- // Try to avoid forwarding loops
- if !self.list
- && (address.eq_ignore_ascii_case(ctx.user_address.as_ref())
- || ctx.envelope.iter().any(|(e, v)| {
- matches!(e, Envelope::From)
- && v.to_string().eq_ignore_ascii_case(address.as_str())
- }))
- {
- return;
- }
-
if !self.copy && matches!(&ctx.final_event, Some(Event::Keep { .. })) {
ctx.final_event = None;
}