some more config for email, almost fully works
This commit is contained in:
parent
75558aeee3
commit
19b0d8b375
4 changed files with 17 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
||||||
conf = {
|
conf = {
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
mail.enable = false; # broken
|
mail.enable = true; # broken
|
||||||
website.enable = false; # broken
|
website.enable = false; # broken
|
||||||
fedi.enable = false; # broken
|
fedi.enable = false; # broken
|
||||||
matrix.enable = true; # broken
|
matrix.enable = true; # broken
|
||||||
|
|
|
@ -5,6 +5,7 @@ in {
|
||||||
./apps
|
./apps
|
||||||
./containers
|
./containers
|
||||||
./fedi
|
./fedi
|
||||||
|
./firewall
|
||||||
./fonts
|
./fonts
|
||||||
./games
|
./games
|
||||||
./git
|
./git
|
||||||
|
|
6
modules/firewall/default.nix
Normal file
6
modules/firewall/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }: {
|
||||||
|
networking = {
|
||||||
|
nftables.enable = true;
|
||||||
|
firewall.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -18,6 +18,8 @@ in mkIf conf.mail.enable {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.users."stalwart-mail".extraGroups = [ "nginx" ];
|
||||||
|
|
||||||
services.stalwart-mail = {
|
services.stalwart-mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
@ -35,7 +37,7 @@ in mkIf conf.mail.enable {
|
||||||
};
|
};
|
||||||
listener = {
|
listener = {
|
||||||
smtp = {
|
smtp = {
|
||||||
protocol = "smtp";
|
protocl = "smtp";
|
||||||
bind = "[::]:25";
|
bind = "[::]:25";
|
||||||
};
|
};
|
||||||
submissions = {
|
submissions = {
|
||||||
|
@ -47,7 +49,7 @@ in mkIf conf.mail.enable {
|
||||||
bind = "[::]:993";
|
bind = "[::]:993";
|
||||||
};
|
};
|
||||||
jmap = {
|
jmap = {
|
||||||
protocol = "jmap";
|
protocol = "http";
|
||||||
bind = "[::]:8080";
|
bind = "[::]:8080";
|
||||||
url = "https://mail.chpu.eu";
|
url = "https://mail.chpu.eu";
|
||||||
};
|
};
|
||||||
|
@ -72,22 +74,22 @@ in mkIf conf.mail.enable {
|
||||||
};
|
};
|
||||||
storage.directory = "in-memory";
|
storage.directory = "in-memory";
|
||||||
session.rcpt.directory = "'in-memory'";
|
session.rcpt.directory = "'in-memory'";
|
||||||
queue.outbound.next-hop = "'local'";
|
|
||||||
directory."imap".lookup.demains = [ "chpu.eu" ];
|
directory."imap".lookup.demains = [ "chpu.eu" ];
|
||||||
directory."in-memory" = {
|
directory."in-memory" = {
|
||||||
type = "memory";
|
type = "memory";
|
||||||
principals = [
|
principals = [
|
||||||
{
|
{
|
||||||
type = "individual";
|
class = "individual";
|
||||||
name = "mira@chpu.eu";
|
name = "mira";
|
||||||
secret = "%{file:/root/stalwart/secret/mira}%";
|
description = "Mira Chacku Purakal";
|
||||||
|
secret = "%{file:/var/lib/stalwart-mail/secret/mira}%";
|
||||||
email = [ "mira@chpu.eu" ];
|
email = [ "mira@chpu.eu" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
authentication.fallback-admin = {
|
authentication.fallback-admin = {
|
||||||
user = "admin";
|
user = "admin";
|
||||||
secret = "%{file:/root/stalwart/secret/admin}%";
|
secret = "%{file:/var/lib/stalwart-mail/secret/admin}%";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue