msmtp: 1.8.26 -> 1.8.30

Upgrade msmtp from 1.8.26 to 1.8.30. The update requires a couple of
additional changes:

  - msmtp has gained a dependency on libnotify via notify-send.

  - msmtp has gained a dependency on GNU sed.

  - msmtp does not configure anymore with autoreconf 2.69. This is fixed
    by unpinning the version.

  - The patch for improved logging via systemd does not apply anymore
    and has been update.
This commit is contained in:
Patrick Steinhardt 2025-07-15 09:10:09 +02:00
parent 30ad5fbf9d
commit f1dffb0363
2 changed files with 35 additions and 22 deletions

View File

@ -1,17 +1,17 @@
diff --git a/scripts/msmtpq/msmtpq b/scripts/msmtpq/msmtpq
index bcb384e..dbaf1b5 100755
index 28d0754..3eaac58 100755
--- a/scripts/msmtpq/msmtpq
+++ b/scripts/msmtpq/msmtpq
@@ -92,6 +92,8 @@ if [ ! -v MSMTPQ_LOG ] ; then
fi
@@ -182,6 +182,8 @@ if [ -n "$MSMTPQ_LOG" ] ; then
unset msmptq_log_dir
fi
[ -d "$(dirname "$MSMTPQ_LOG")" ] || mkdir -p "$(dirname "$MSMTPQ_LOG")"
+
+JOURNAL=@journal@
## ======================================================================================
## msmtpq can use the following environment variables :
@@ -144,6 +146,7 @@ on_exit() { # unlock the queue on exit if the lock was
+JOURNAL=@journal@
+
umask 077 # set secure permissions on created directories and files
declare -i CNT # a count of mail(s) currently in the queue
@@ -214,6 +216,7 @@ on_exit() { # unlock the queue on exit if the lock was
## display msg to user, as well
##
log() {
@ -19,7 +19,7 @@ index bcb384e..dbaf1b5 100755
local ARG RC PFX
PFX="$('date' +'%Y %d %b %H:%M:%S')"
# time stamp prefix - "2008 13 Mar 03:59:45 "
@@ -161,10 +164,19 @@ log() {
@@ -233,10 +236,19 @@ log() {
done
fi

View File

@ -4,11 +4,12 @@
symlinkJoin,
lib,
fetchFromGitHub,
autoreconfHook269,
autoreconfHook,
pkg-config,
bash,
coreutils,
gnugrep,
gnused,
gnutls,
gsasl,
libidn2,
@ -20,6 +21,8 @@
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
withScripts ? true,
withLibnotify ? true,
libnotify,
gitUpdater,
binlore,
msmtp,
@ -28,13 +31,13 @@
let
inherit (lib) getBin getExe optionals;
version = "1.8.26";
version = "1.8.30";
src = fetchFromGitHub {
owner = "marlam";
repo = "msmtp";
rev = "msmtp-${version}";
hash = "sha256-MV3fzjjyr7qZw/BbKgsSObX+cxDDivI+0ZlulrPFiWM=";
hash = "sha256-aM2qId08zvT9LbncCQYHsklbvHVtcZJgr91JTjwpQ/0=";
};
meta = with lib; {
@ -62,7 +65,7 @@ let
] ++ optionals withKeyring [ libsecret ];
nativeBuildInputs = [
autoreconfHook269
autoreconfHook
pkg-config
texinfo
];
@ -112,13 +115,17 @@ let
msmtpq = {
scripts = [ "bin/msmtpq" ];
interpreter = getExe bash;
inputs = [
binaries
coreutils
gnugrep
netcat-gnu
which
] ++ optionals withSystemd [ systemd ];
inputs =
[
binaries
coreutils
gnugrep
gnused
netcat-gnu
which
]
++ optionals withSystemd [ systemd ]
++ optionals withLibnotify [ libnotify ];
execer =
[
"cannot:${getBin binaries}/bin/msmtp"
@ -126,9 +133,15 @@ let
]
++ optionals withSystemd [
"cannot:${getBin systemd}/bin/systemd-cat"
]
++ optionals withLibnotify [
"cannot:${getBin libnotify}/bin/notify-send"
];
fix."$MSMTP" = [ "msmtp" ];
fake.external = [ "ping" ] ++ optionals (!withSystemd) [ "systemd-cat" ];
fake.external =
[ "ping" ]
++ optionals (!withSystemd) [ "systemd-cat" ]
++ optionals (!withLibnotify) [ "notify-send" ];
keep.source = [ "~/.msmtpqrc" ];
};