[PATCH] gnu: msmtp: Make it configurable with envrinoment variables

  • Done
  • quality assurance status badge
Details
2 participants
  • Andrew Tropin
  • Leo Famulari
Owner
unassigned
Submitted by
Andrew Tropin
Severity
normal
A
A
Andrew Tropin wrote on 9 Jul 2021 12:26
(address . guix-patches@gnu.org)
877dhzzstl.fsf@trop.in
-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDoJFYPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wktsP/RKmrPUqs9WajfiHZ3jUUgbL2JFlX2M9hFKo
XrBh0cAhD20a6frYqbCzag6Imtg+zxJxOf31j+5hqhtwDgYZM75lOXinEEIMO07p
GTmteIrung6td4smkJh4f1ASQXhMqQnS8LgAKS8jHN5SCSj3SuiXsagmgXdWcf7Q
VzfOpExZhrVRcESOLo6/bkIVyfrxnZp4NqiSFEQI52Hz1uW1q2lvB11WUw9n1kML
+OpH9Xi5gfdy02tg0KEZRYgOsLik1haTkq3oPe1o+LKP4zPN2g69fpaHWOkPU3W6
nV6Sxf4uK125Cv1pBevCAXdPck8XIcy37kmEDUTKAH5Zww0Ke21D2qobVxE04pf0
8m26Af1zmCCajcsj6Dhmj2dVffpFC11UDrNCbtiNmdoPmdc55Dui69TDZCpPzXen
/gha9FLiW4sw7sfnBYrcYe9Hw2+pDIgn9CrkeToNEcye9Ytv/lFQmQI9oh9X8d0L
m7NQ6rmyGP1f7dUXKA/3Jk2B3zCYUw4kWvo2CIe1iacwECsNSwoKwj6ph2+kOjaL
+8yjAqKRlCpM8v+63Vim4Rqct+hR4j4nJklQ0bMh8Ta2T+mOcEvlXhHn4Pi4Immy
KH0+aIez7kGsgld64lDMoi6rebqEyuzmjPaTmLx21GgFpYsRhEiRZiYt7wlM2uwV
XZrBptDf
=kZTm
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 10 Jul 2021 20:23
(name . Andrew Tropin)(address . andrew@trop.in)(address . 49486@debbugs.gnu.org)
YOnlk502qx6js8g0@jasmine.lan
On Fri, Jul 09, 2021 at 01:26:30PM +0300, Andrew Tropin wrote:
Toggle quote (20 lines)
> From 38987bffcd1088315c6414d6c6141140c3969e6b Mon Sep 17 00:00:00 2001
> From: Andrew Tropin <andrew@trop.in>
> Date: Fri, 9 Jul 2021 13:20:10 +0300
> Subject: [PATCH] gnu: msmtp: Make it configurable with envrinoment variables
>
> Add the support of following environment variables:
> MSMTPQ_QUEUE_DIR
> MSMTPQ_LOG
> MSMTPQ_QUIET
> MSMTPQ_CONN_TEST
>
> Add new --enqueue option, which forces to enqueue message instead of
> attempting to send it.
>
> Make msmtpq quite by default for compatibility with emacs and use ping instead
> of netcat for connection test.
>
> Use binary absolute path in msmtpq and msmtp-queue scripts instead of relying
> on the binary being present in the $PATH.

Thanks!

Did you send these patches upstream?


In general, we don't patch packages to add features in Guix. We try to
stay close to what is offered by the upstream development team, except
for bug fixes.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmDp5ZMACgkQJkb6MLrK
fwgfKxAAsXEU6Hr2Uh7/SDCnhiT2TDbM9orMT0BlnBisp3lG8IU1b2SS8idmugiA
iqkj3UeP1Bqtd14MJHYicmazG4yQ7xoiigpNfWTb749FZnn+k0cFzjUDoguSFYlX
MfZwRaUOrrpH9osqc+sygYmjt8/qXIm3fnhPzGdLgfU1Ca7QGoXqQi/YwB7cEop4
fM8b+kk0/mTrUubWdIVri5TBmp8jMJr+/b0Sr/JCzZ5F6Ro1DkR0n281VaZhNkj4
YLsx3csfssAHeweTd89sevi7AVhYl16mpGmxeEyk0zIsItsV0Pl60CfdoOmdOVym
8vRAIAu3z/TWQoJfnVWaN3zi9JA5ZQMyPjKT+JBaI2DGJH0/tWPDlSX7PuMcS/67
OmwN8aFOpd7jrq+LNqcCCfJe2F27WwcHP72gXIQfzx7k1qUsPUNoZ00HlOwHvkIG
eO/QVRnYlJLMK3HEHgawoTxsLruhjJE1zzBuTjkdGlGsjCc8Juv12LV1HlIwPdPD
dY0aAabVpINMRwQ1RQqoA+z24FvHNCyFIpMDzsnu/VQGUVIUcJBsuLmlH0l1HN7U
/KAioFYgccMySCRm+RBHP9rsc7X26hhc/vGOiCI15ItmAdiH9KT/7Qw79H9FN97C
Vx7mDl0YQtAOVb2VQa2eR5bW9aB/34LYO9HqqsV7IdMIhdeDrpA=
=k8P+
-----END PGP SIGNATURE-----


A
A
Andrew Tropin wrote on 12 Jul 2021 05:33
(name . Leo Famulari)(address . leo@famulari.name)(address . 49486@debbugs.gnu.org)
87mtqsrytk.fsf@trop.in
Leo Famulari <leo@famulari.name> writes:

Toggle quote (28 lines)
> On Fri, Jul 09, 2021 at 01:26:30PM +0300, Andrew Tropin wrote:
>> From 38987bffcd1088315c6414d6c6141140c3969e6b Mon Sep 17 00:00:00 2001
>> From: Andrew Tropin <andrew@trop.in>
>> Date: Fri, 9 Jul 2021 13:20:10 +0300
>> Subject: [PATCH] gnu: msmtp: Make it configurable with envrinoment variables
>>
>> Add the support of following environment variables:
>> MSMTPQ_QUEUE_DIR
>> MSMTPQ_LOG
>> MSMTPQ_QUIET
>> MSMTPQ_CONN_TEST
>>
>> Add new --enqueue option, which forces to enqueue message instead of
>> attempting to send it.
>>
>> Make msmtpq quite by default for compatibility with emacs and use ping instead
>> of netcat for connection test.
>>
>> Use binary absolute path in msmtpq and msmtp-queue scripts instead of relying
>> on the binary being present in the $PATH.
>
> Thanks!
>
> Did you send these patches upstream?
>
> https://marlam.de/msmtp/contact/
>

Yes, just a few minutes ago.

Toggle quote (4 lines)
> In general, we don't patch packages to add features in Guix. We try to
> stay close to what is offered by the upstream development team, except
> for bug fixes.

Agree, --enqueue is a feature and probably doesn't belong to the PM
repo, the rest is more like a fix. Ok, let's see, what Martin will
reply to proposed changes and I'll adjust this patch accordingly.
-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDrt/cPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wwVcP/AppxzkN+5rYukVb2ehsyHpBGi32m2GLBCz/
f0kYr5wRieq7KPY/pscgdAVDF7KIwDoYO0qR+kOw0WMVWzLeHXGrh34IFl9dIdGt
9r6l9KJkR3iFrNuU3gwjyXPwzwPIgjTDUCYfHHcHadb+5Halgkg618RjQ+nTgLb5
LBhZecUmJE/LQSH54GRzapdtijtnMudRP0K5+E3e+r7POaVad5rbVIPkQkeHfvMz
c62nivfB56enbMvDCw6/ttYoJZaaN1kONEJtYCTRKlU//DSWXtmD4Ed76A5P4okq
BW5/YRN1WL7fPFid9uhSBT37OYvrtOe//7I0QwL8+xRH+Ld4BU1jqJU40u+D/JO4
wjJ8yHi5mrFbodAu9P/SbXvPcrZ4G8yefHcwLoMp4oMTbfMydQmgz1bRctZxiX/j
DmZZaeGcbmnCB+pa3LNTIA2mOJuQ76ouR+1+HqfkSP0oaMisaec1xhOJ46+0+gz6
i7WGSVbdMb8PtCwzvOYSLDTjvjzYU6qgLq/Cw6XMJVguGSDulPg/FAv3JwboE+q1
CgJakw2TG6nJk5VEOOOB/6FiLxDAezTLCPCWqpudjkNQLaoUr8yK34iZAZuy3tnV
ftLHll7ODgTH4/3EKS2pFiftctorz5PRFdnB9G94UQBrBgAfag0hYAuQwsHehlb6
42/A8WK+
=/nbd
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 12 Jul 2021 16:56
(name . Andrew Tropin)(address . andrew@trop.in)(address . 49486@debbugs.gnu.org)
YOxYJ4YgdambaV95@jasmine.lan
On Mon, Jul 12, 2021 at 06:33:11AM +0300, Andrew Tropin wrote:
Toggle quote (4 lines)
> Agree, --enqueue is a feature and probably doesn't belong to the PM
> repo, the rest is more like a fix. Ok, let's see, what Martin will
> reply to proposed changes and I'll adjust this patch accordingly.

Thanks, let us know what happens. I use msmtp so I'm interested :)
A
A
Andrew Tropin wrote on 14 Sep 2021 09:44
(name . Leo Famulari)(address . leo@famulari.name)(address . 49486@debbugs.gnu.org)
874kanmwjg.fsf@trop.in
On 2021-07-12 10:56, Leo Famulari wrote:

Toggle quote (7 lines)
> On Mon, Jul 12, 2021 at 06:33:11AM +0300, Andrew Tropin wrote:
>> Agree, --enqueue is a feature and probably doesn't belong to the PM
>> repo, the rest is more like a fix. Ok, let's see, what Martin will
>> reply to proposed changes and I'll adjust this patch accordingly.
>
> Thanks, let us know what happens. I use msmtp so I'm interested :)

On 2021-08-26 08:59, Martin Lambers wrote:

Toggle quote (15 lines)
> Hi, sorry for the late response.

> I am not sure about the changes. Changing behavior via environment
> variables is fragile and non-obvious to users. And there's a reason
> 'make install' does not put msmtpq in the user's $PATH: in its
> current state, the script is really only an example that needs to be
> customized.

> I would prefer a more complete solution, possibly including a
> configuration file.

> But interest in updating or maintaining the script has been very low in
> the last years, so I assume the user base is very small. This would mean
> that just keeping it as an example is ok.

It seems that this script is unmaintained and served as an example.
Martin also proposed to take the maintanance responsibility of it in the
other message, but I needed it only for testing and don't use it anymore
and thus don't want to take this duty.

However, the patches themselves still seems good to me and they can be
useful for other people. So we can keep them downstream and provide a
little more flexible version of msmtpq script for guix users or close
this ticket and keep them only in that thread for the history)

The first one is a little more userfriendly IMO, the second one reduces
maintanance burden, which also is a good thing.

I'm ok with both options. LMKWYT.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFAUsMACgkQIgjSCVjB
3rArow//ZrwDnQ7XtPa5yYgTtC267w7QLE8Y2gb9rE/FQvYL3FGauMNX8LZ8eL2k
q5tpu7/SNukBzy0lvPbVJyQX2QtRMPmuAGXOS6hP82q4NoG7yYwxT7uVdAQNvdfc
V3sSCTsixZzSFoYhL8YmCTwQ5Xc6un18rxrN9Meus9FrevTL8RtWqfm0wdtY4wKP
bNiJRKMlAvw5qAtaeWI7ACYsXiz7kec7wO+/puj9ht6rktZWT8yF6wdOsDXQf1cu
799sGl5fYhMCKinD8L85MBKvr/GqqaWraxUvO2GoTP1uyu4LqyQfK2fkv2Xs9Pj7
u3PVEQMf6fNNNuUQf5YbX9s2qOvrp0OXqXkySYqFcdpCxDNRe7orYRCeBq6C/vGH
ONJ6Gl4qLzzF2wQQpJ8QCWwpZRBwHLP6IosTWXm4ah2uqYa50PYYJsFsFsKx7UaN
Fflt/6FaXdIw6iCYuVZ0sOg0dw8r3TmS7lpjXSaBwpXNUodKyNqDLus1ENAgDdOm
gdJ3sRyIFfH2yWzbW5I0qBkdAT3W19qMsC+TyI8LZIOBRtqtjhtnQJxToeMteB9N
AUwTD+2ngRtE6bEWp3rhiuTDS9VGdClkQVdVYaUY8MVop1U6bOeRTfpWz4ZvWdF7
SGN1uqXJlEyyvsOm30iLNtKzCE8kU00vIJj5QKnelkH+UvIr36E=
=GrSZ
-----END PGP SIGNATURE-----

A
A
Andrew Tropin wrote on 2 Mar 2022 06:12
Close issue
(address . control@debbugs.gnu.org)
87wnhdym2b.fsf@trop.in
close 49486
-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmIe/MwPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6w9SUP/2rulWOEYShL1J+pe6dPJ5RiZkHbiUFsfZLI
lS9dV5U7Tzg12MtRbCbDHfjrkST1xYpm2nrfeKtAsTpGy+6Fey+AdFfIs0Dn9pry
A7rxpYIO+GnLzsEFdUNVC9yYotjvb77vCiknmR2XWBrzdFmH2/69RJspcdWQBVgt
czgL5RcY+2nIPOXdDK4+SH8g3F0N5YGV/a1HBrkaUSIPGrfYE9OfmweliH0ePyjZ
CxlBc2yacOLh+7+bdk5dr1I7SdYmBdacSr2hESwg4GA6DidyZULrSqsjqhZSDqNP
fx6V8YiEpXawC6EWoHsRb71V64YF7pWY2huBHBZleVrXCexBrX3zla4ClIGoJF9c
Q/B4BpH6fUUKh4FISUxY7/1axwa4D2g2W5OkCOzNqK++uRXyFiVedSz7guBOO9cd
FR5lakzNbqt36V5UOnYg/D51DY4DpUpStGZ+2bMh91IuPyUSSUajSvuya3RmZBK+
38/nSlKFtuwvHRvvvGq0L4Y9j6IGBrrSO+tJNKa+TKyCcZKXhEwVADflgzNa+dBF
o4SkPmzsPJ5ZuNh4wpwlYqF3kdv0N/JEyHqJJAgE86AuO8DV+eOiqk7Yf5bja1a3
j8SkWKmrbdqZn9yFJF2auT5hqKwlxUkSLx9BrlueK0J7z6O2CAbe3J5QW4TsSm+D
pj5ooqd9
=/EOt
-----END PGP SIGNATURE-----

?