mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 03:26:13 +01:00
Add maildrop
overlay
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
67bbe8551c
commit
d9b1925c57
|
@ -56,6 +56,7 @@
|
||||||
overlays/zfs-relmount
|
overlays/zfs-relmount
|
||||||
overlays/ical2org.nix
|
overlays/ical2org.nix
|
||||||
overlays/mautrix-discord.nix
|
overlays/mautrix-discord.nix
|
||||||
|
overlays/maildrop
|
||||||
];
|
];
|
||||||
|
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
|
|
49
overlays/maildrop/default.nix
Normal file
49
overlays/maildrop/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
singleton;
|
||||||
|
|
||||||
|
pname = "maildrop";
|
||||||
|
version = "3.1.5";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.overlays.maildrop =
|
||||||
|
final: prev:
|
||||||
|
{
|
||||||
|
maildrop = prev.stdenv.mkDerivation {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
src = prev.fetchurl {
|
||||||
|
url = "mirror://sourceforge/courier/${pname}/${version}/${pname}-${version}.tar.bz2";
|
||||||
|
sha256 = "sha256-Izg/s5uSaQRWRpOXSO5zfnXJ8jmU+MBnI/MEyXp42lo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = with prev; singleton pkg-config;
|
||||||
|
buildInputs = with prev; [
|
||||||
|
perl
|
||||||
|
pcre2.dev
|
||||||
|
libidn2.dev
|
||||||
|
courier-unicode
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./dont-reset-path.patch
|
||||||
|
./maildrop.configure.hack.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-maildrop-uid="
|
||||||
|
"--enable-maildrop-gid="
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "http://www.courier-mta.org/maildrop/";
|
||||||
|
description = "Mail filter/mail delivery agent that is used by the Courier Mail Server";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
29
overlays/maildrop/dont-reset-path.patch
Normal file
29
overlays/maildrop/dont-reset-path.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
From 205aad195842ce19350261849d6378b39e00b11c Mon Sep 17 00:00:00 2001
|
||||||
|
From: main <magic_rb@redalder.org>
|
||||||
|
Date: Sun, 10 Apr 2022 15:35:10 +0200
|
||||||
|
Subject: [PATCH] dont reset path
|
||||||
|
|
||||||
|
---
|
||||||
|
libs/maildrop/main.C | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libs/maildrop/main.C b/libs/maildrop/main.C
|
||||||
|
index efc7d1f..daf9d2d 100644
|
||||||
|
--- a/libs/maildrop/main.C
|
||||||
|
+++ b/libs/maildrop/main.C
|
||||||
|
@@ -66,8 +66,8 @@ int quota_warn_percent = -1;
|
||||||
|
const char *quota_warn_message=0;
|
||||||
|
|
||||||
|
static const char *defaults_vars[]={"LOCKEXT","LOCKSLEEP","LOCKTIMEOUT",
|
||||||
|
- "LOCKREFRESH", "PATH", "SENDMAIL",
|
||||||
|
+ "LOCKREFRESH", "SENDMAIL",
|
||||||
|
"MAILDIRQUOTA"};
|
||||||
|
static const char *defaults_vals[]={LOCKEXT_DEF,LOCKSLEEP_DEF,LOCKTIMEOUT_DEF,
|
||||||
|
- LOCKREFRESH_DEF, DEFAULT_PATH,
|
||||||
|
+ LOCKREFRESH_DEF,
|
||||||
|
SENDMAIL_DEF, ""};
|
||||||
|
|
||||||
|
Maildrop maildrop;
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
13
overlays/maildrop/maildrop.configure.hack.patch
Normal file
13
overlays/maildrop/maildrop.configure.hack.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- a/libs/maildrop/configure 2012-09-06 01:52:13.000000000 +0100
|
||||||
|
+++ b/libs/maildrop/configure 2013-01-04 03:00:57.095628327 +0000
|
||||||
|
@@ -17562,8 +17562,8 @@
|
||||||
|
check_spooldir() {
|
||||||
|
if test "$CHECKED_SPOOLDIR" != 1
|
||||||
|
then
|
||||||
|
- get_spooldir
|
||||||
|
- MBOX_DIR="$SPOOLDIR"
|
||||||
|
+ MBOX_DIR="/var/spool/mail"
|
||||||
|
+ MBOX_RESET_GID=0
|
||||||
|
CHECKED_SPOOLDIR=1
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in a new issue