Adding sieve & nullmailer

This commit is contained in:
Lyes Saadi 2025-10-15 03:46:05 +02:00
parent 8fb4bf2858
commit 1898f95ac8
Signed by: lyes
GPG key ID: 55A1D803917CF39A
5 changed files with 48 additions and 7 deletions

12
flake.lock generated
View file

@ -173,11 +173,11 @@
]
},
"locked": {
"lastModified": 1760312644,
"narHash": "sha256-U9SkK45314urw9P7MmjhEgiQwwD/BTj+T3HTuz1JU1Q=",
"lastModified": 1760462439,
"narHash": "sha256-bks3rTsKGlqehk4l7rViIg2lBnUsY6we22O+ecRZB/c=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e121f3773fa596ecaba5b22e518936a632d72a90",
"rev": "990e5ce6791ff1f497a61280a82eb66e3789e0e9",
"type": "github"
},
"original": {
@ -393,11 +393,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1760380505,
"narHash": "sha256-qSDhqXzeGcgidKdT3HCxEbuo4/VFI46lcXODRZtwCxg=",
"lastModified": 1760466542,
"narHash": "sha256-q2QZhrrjHbvW4eFzoEGkj/wUHNU6bVGPyflurx5ka6U=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "21d967b539f2c599786356c2cae17b1273aaa6ad",
"rev": "3446bcbf5f46ecb18e82244888730c4983c30b22",
"type": "github"
},
"original": {

View file

@ -1,6 +1,10 @@
{ pkgs, ... }:
{
imports = [
./nullmailer.nix
];
services.openssh.enable = true;
boot.swraid = {

View file

@ -0,0 +1,17 @@
{ ... }:
{
services.nullmailer = {
enable = true;
setSendmail = true;
config = {
remotes = ''
taf.lyes.eu smtp
'';
adminaddr = "root@lyes.eu";
defaulthost = "lyes.eu";
allmailfrom = "root@lyes.eu";
};
};
}

View file

@ -46,6 +46,26 @@
aliases = [
"@lyes.eu"
];
quota = "1T";
sieveScript = ''
require ["fileinto", "regex", "variables"];
if address :is :domain "X-Original-To" "lyes.eu" {
if address :localpart :regex "X-Original-To" "^(([a-zA-Z]+\\.)*([a-zA-Z]+))(-([a-zA-Z0-9_.\\-]*))?''$" {
set "mbox_candidate" "INBOX.''${1}";
fileinto "''${mbox_candidate}";
}
else {
fileinto "INBOX.other";
}
}
elsif address :is "X-Original-To" "lyes@mail.lyes.eu" {
fileinto "INBOX";
}
else {
fileinto "INBOX.other";
}
'';
};
};

View file

@ -72,7 +72,7 @@ in {
# unstable.suyu
# suyu
# factorio
sgt-sgt-puzzles
sgt-puzzles
# Reading
# calibre