mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-24 04:40:53 +01:00
chore: roundcube on gustave + patch stalwart
This commit is contained in:
parent
12d7d20bc6
commit
7414530d3e
4 changed files with 73 additions and 6 deletions
|
@ -113,11 +113,6 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.roundcube = {
|
|
||||||
enable = true;
|
|
||||||
hostName = "webmail.luj.fr";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall.allowedUDPPorts = [
|
||||||
51821
|
51821
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
{ config, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
services.stalwart-mail = {
|
services.stalwart-mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.stalwart-mail.overrideAttrs (
|
||||||
|
_: _: {
|
||||||
|
patches = [ ./stalwart.patch ];
|
||||||
|
}
|
||||||
|
);
|
||||||
settings = {
|
settings = {
|
||||||
authentication.fallback-admin = {
|
authentication.fallback-admin = {
|
||||||
user = "admin";
|
user = "admin";
|
||||||
|
|
46
machines/akhaten/stalwart.patch
Normal file
46
machines/akhaten/stalwart.patch
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
From 1282e77ea96e5154011b3d4607c15140003ee2e6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: mdecimus <mauro@stalw.art>
|
||||||
|
Date: Sun, 9 Mar 2025 17:47:40 +0100
|
||||||
|
Subject: [PATCH] Do not panic when mailboxId is not found (closes #1293)
|
||||||
|
|
||||||
|
---
|
||||||
|
crates/imap/src/op/list.rs | 18 +++++++++++++++++-
|
||||||
|
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/crates/imap/src/op/list.rs b/crates/imap/src/op/list.rs
|
||||||
|
index 250db4be..4231ec1b 100644
|
||||||
|
--- a/crates/imap/src/op/list.rs
|
||||||
|
+++ b/crates/imap/src/op/list.rs
|
||||||
|
@@ -22,6 +22,7 @@ use imap_proto::{
|
||||||
|
},
|
||||||
|
receiver::Request,
|
||||||
|
};
|
||||||
|
+use trc::StoreEvent;
|
||||||
|
|
||||||
|
use super::ImapContext;
|
||||||
|
|
||||||
|
@@ -202,7 +203,22 @@ impl<T: SessionStream> SessionData<T> {
|
||||||
|
|
||||||
|
for (mailbox_name, mailbox_id) in &account.mailbox_names {
|
||||||
|
if matches_pattern(&patterns, mailbox_name) {
|
||||||
|
- let mailbox = account.mailbox_state.get(mailbox_id).unwrap();
|
||||||
|
+ let mailbox = if let Some(mailbox) = account.mailbox_state.get(mailbox_id) {
|
||||||
|
+ mailbox
|
||||||
|
+ } else {
|
||||||
|
+ trc::event!(
|
||||||
|
+ Store(StoreEvent::UnexpectedError),
|
||||||
|
+ Details = "IMAP mailbox no longer present in account state",
|
||||||
|
+ Id = *mailbox_id,
|
||||||
|
+ Details = account
|
||||||
|
+ .mailbox_state
|
||||||
|
+ .keys()
|
||||||
|
+ .copied()
|
||||||
|
+ .map(trc::Value::from)
|
||||||
|
+ .collect::<Vec<_>>()
|
||||||
|
+ );
|
||||||
|
+ continue;
|
||||||
|
+ };
|
||||||
|
let mut has_recursive_match = false;
|
||||||
|
if recursive_match {
|
||||||
|
let prefix = format!("{}/", mailbox_name);
|
||||||
|
|
|
@ -161,5 +161,21 @@
|
||||||
networking.firewall.allowedTCPPorts = [ 51820 ];
|
networking.firewall.allowedTCPPorts = [ 51820 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||||
|
|
||||||
|
services.roundcube = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"managesieve"
|
||||||
|
];
|
||||||
|
hostName = "webmail.luj.fr";
|
||||||
|
extraConfig = ''
|
||||||
|
# starttls needed for authentication, so the fqdn required to match
|
||||||
|
# the certificate
|
||||||
|
$config['smtp_server'] = "tls://mail.luj.fr";
|
||||||
|
$config['smtp_user'] = "%u";
|
||||||
|
$config['smtp_pass'] = "%p";
|
||||||
|
$config['imap_host'] = 'ssl://mail.luj.fr';
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue