Github messages for mblaze
 help / color / mirror / Atom feed
* [PR PATCH] Allow for a default Bcc, specified via $MBLAZE/profile
@ 2025-07-03 11:26 ferriff
  2025-07-03 11:46 ` [PR PATCH] [Updated] " ferriff
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ferriff @ 2025-07-03 11:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

There is a new pull request by ferriff against master on the mblaze repository

https://github.com/ferriff/mblaze master
https://github.com/leahneukirchen/mblaze/pull/270

Allow for a default Bcc, specified via $MBLAZE/profile
Useful when bcc-ing oneself is used as alternative to a `Sent` folder.

A patch file from https://github.com/leahneukirchen/mblaze/pull/270.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-270.patch --]
[-- Type: text/x-diff, Size: 956 bytes --]

From f1516c677befdf34b25248e8dc34ebd444276dd5 Mon Sep 17 00:00:00 2001
From: Federico Ferri <federico.ferri@cern.ch>
Date: Thu, 3 Jul 2025 13:17:52 +0200
Subject: [PATCH] feat(mcom): allow for a default Bcc, specified via
 $MBLAZE/profile

---
 mcom | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mcom b/mcom
index 992af24..efe277c 100755
--- a/mcom
+++ b/mcom
@@ -104,6 +104,7 @@ sendmail=$(mhdr -h sendmail "$MBLAZE/profile")
 sendmail_args=$(mhdr -h sendmail-args "$MBLAZE/profile")
 sendmail="${sendmail:-sendmail} ${sendmail_args:--t}"
 default_from=$(mhdr -h local-mailbox "$MBLAZE/profile")
+default_bcc=$(mhdr -h bcc "$MBLAZE/profile")
 senthook=$(mhdr -h senthook "$MBLAZE/profile")
 
 defaultc=e
@@ -234,6 +235,8 @@ case "$0" in
 	;;
 esac
 
+[ -n "$default_bcc" ] && hdrs="$hdrs$NL$(printf 'bcc: %s\n' "$default_bcc")"
+
 hdrs="$(printf '%s\n' "${hdrs#$NL}" | mhdr -)"
 
 outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:")

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] Allow for a default Bcc, specified via $MBLAZE/profile
  2025-07-03 11:26 [PR PATCH] Allow for a default Bcc, specified via $MBLAZE/profile ferriff
@ 2025-07-03 11:46 ` ferriff
  2025-07-03 12:00 ` leahneukirchen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ferriff @ 2025-07-03 11:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

There is an updated pull request by ferriff against master on the mblaze repository

https://github.com/ferriff/mblaze master
https://github.com/leahneukirchen/mblaze/pull/270

Allow for a default Bcc, specified via $MBLAZE/profile
Useful when bcc-ing oneself is used as alternative to a `Sent` folder.

A patch file from https://github.com/leahneukirchen/mblaze/pull/270.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-270.patch --]
[-- Type: text/x-diff, Size: 1265 bytes --]

From b3edaab0c99458f0650ec1fe63be84e405f99727 Mon Sep 17 00:00:00 2001
From: Federico Ferri <federico.ferri@cern.ch>
Date: Thu, 3 Jul 2025 13:17:52 +0200
Subject: [PATCH] feat(mcom): allow for a default Bcc, specified via
 $MBLAZE/profile

---
 mcom | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mcom b/mcom
index 992af24..2332cd4 100755
--- a/mcom
+++ b/mcom
@@ -104,6 +104,7 @@ sendmail=$(mhdr -h sendmail "$MBLAZE/profile")
 sendmail_args=$(mhdr -h sendmail-args "$MBLAZE/profile")
 sendmail="${sendmail:-sendmail} ${sendmail_args:--t}"
 default_from=$(mhdr -h local-mailbox "$MBLAZE/profile")
+default_bcc=$(mhdr -h bcc "$MBLAZE/profile")
 senthook=$(mhdr -h senthook "$MBLAZE/profile")
 
 defaultc=e
@@ -234,6 +235,8 @@ case "$0" in
 	;;
 esac
 
+[ -n "$default_bcc" ] && hdrs="$hdrs$NL$(printf 'bcc: %s\n' "$default_bcc")"
+
 hdrs="$(printf '%s\n' "${hdrs#$NL}" | mhdr -)"
 
 outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:")
@@ -386,7 +389,7 @@ fi
 			       "$(mhdr -d -A -h to:cc: "$1" |
 				       notmine |grep -Fv -e "$to" |
 				       ouniq |commajoin)"
-			printf 'Bcc: \n'
+			[ -z "$default_bcc" ] && printf 'Bcc: \n'
 			printf '%s\n' "$hdrs" | awk '{ print }' |
 				msed "/body/d" -
 		fi | sed '/^$/d'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Allow for a default Bcc, specified via $MBLAZE/profile
  2025-07-03 11:26 [PR PATCH] Allow for a default Bcc, specified via $MBLAZE/profile ferriff
  2025-07-03 11:46 ` [PR PATCH] [Updated] " ferriff
@ 2025-07-03 12:00 ` leahneukirchen
  2025-07-03 12:14 ` ferriff
  2025-07-06  9:57 ` [PR PATCH] [Updated] " ferriff
  3 siblings, 0 replies; 5+ messages in thread
From: leahneukirchen @ 2025-07-03 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/pull/270#issuecomment-3032007189

Comment:
Hm, `$MBLAZE/headers` doesn't work because it's duplicated then?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Allow for a default Bcc, specified via $MBLAZE/profile
  2025-07-03 11:26 [PR PATCH] Allow for a default Bcc, specified via $MBLAZE/profile ferriff
  2025-07-03 11:46 ` [PR PATCH] [Updated] " ferriff
  2025-07-03 12:00 ` leahneukirchen
@ 2025-07-03 12:14 ` ferriff
  2025-07-06  9:57 ` [PR PATCH] [Updated] " ferriff
  3 siblings, 0 replies; 5+ messages in thread
From: ferriff @ 2025-07-03 12:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

New comment by ferriff on mblaze repository

https://github.com/leahneukirchen/mblaze/pull/270#issuecomment-3032044878

Comment:
Oh, right... I thought I saw `$MBLAZE/headers` somewhere but could not find back any documentation for it. It was likely just in the code itself then!

Now considering `$MBLAZE/headers`: the point is that the `Bcc` would be specific to a given profile, and when handling multiple profiles it would be convenient to have the customization all in one place, and set everything in one go, e.g., via a single `cp profile_XYZ $MBLAZE/profile`. What do you think, do you see any better alternative?

Thanks for your quick look into this (and for this *GREAT* set of tools, too late discovery after years of mutt/neomutt).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] Allow for a default Bcc, specified via $MBLAZE/profile
  2025-07-03 11:26 [PR PATCH] Allow for a default Bcc, specified via $MBLAZE/profile ferriff
                   ` (2 preceding siblings ...)
  2025-07-03 12:14 ` ferriff
@ 2025-07-06  9:57 ` ferriff
  3 siblings, 0 replies; 5+ messages in thread
From: ferriff @ 2025-07-06  9:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

There is an updated pull request by ferriff against master on the mblaze repository

https://github.com/ferriff/mblaze master
https://github.com/leahneukirchen/mblaze/pull/270

Allow for a default Bcc, specified via $MBLAZE/profile
Useful when bcc-ing oneself is used as alternative to a `Sent` folder.

A patch file from https://github.com/leahneukirchen/mblaze/pull/270.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-270.patch --]
[-- Type: text/x-diff, Size: 1935 bytes --]

From b3edaab0c99458f0650ec1fe63be84e405f99727 Mon Sep 17 00:00:00 2001
From: Federico Ferri <federico.ferri@cern.ch>
Date: Thu, 3 Jul 2025 13:17:52 +0200
Subject: [PATCH 1/2] feat(mcom): allow for a default Bcc, specified via
 $MBLAZE/profile

---
 mcom | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mcom b/mcom
index 992af24..2332cd4 100755
--- a/mcom
+++ b/mcom
@@ -104,6 +104,7 @@ sendmail=$(mhdr -h sendmail "$MBLAZE/profile")
 sendmail_args=$(mhdr -h sendmail-args "$MBLAZE/profile")
 sendmail="${sendmail:-sendmail} ${sendmail_args:--t}"
 default_from=$(mhdr -h local-mailbox "$MBLAZE/profile")
+default_bcc=$(mhdr -h bcc "$MBLAZE/profile")
 senthook=$(mhdr -h senthook "$MBLAZE/profile")
 
 defaultc=e
@@ -234,6 +235,8 @@ case "$0" in
 	;;
 esac
 
+[ -n "$default_bcc" ] && hdrs="$hdrs$NL$(printf 'bcc: %s\n' "$default_bcc")"
+
 hdrs="$(printf '%s\n' "${hdrs#$NL}" | mhdr -)"
 
 outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:")
@@ -386,7 +389,7 @@ fi
 			       "$(mhdr -d -A -h to:cc: "$1" |
 				       notmine |grep -Fv -e "$to" |
 				       ouniq |commajoin)"
-			printf 'Bcc: \n'
+			[ -z "$default_bcc" ] && printf 'Bcc: \n'
 			printf '%s\n' "$hdrs" | awk '{ print }' |
 				msed "/body/d" -
 		fi | sed '/^$/d'

From 9b5cd22204f001076f411758cf2d6f292f181e4e Mon Sep 17 00:00:00 2001
From: Federico Ferri <federico.ferri@cern.ch>
Date: Sun, 6 Jul 2025 11:54:37 +0200
Subject: [PATCH 2/2] fix(print_human): add unit k below 1M

---
 mscan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mscan.c b/mscan.c
index fd5e4ec..6971a59 100644
--- a/mscan.c
+++ b/mscan.c
@@ -294,9 +294,9 @@ print_human(intmax_t i, int w)
 	}
 
 	if (d < 1.0)
-		return printf("%*.2f", w, d);
+		return printf("%*.2fk", w, d);
 	else if (!*u)
-		return printf("%*.0f", w, d);
+		return printf("%*.0fk", w, d);
 	else if (d < 10.0)
 		return printf("%*.1f%s", w-1, d, u);
 	else

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-06  9:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-03 11:26 [PR PATCH] Allow for a default Bcc, specified via $MBLAZE/profile ferriff
2025-07-03 11:46 ` [PR PATCH] [Updated] " ferriff
2025-07-03 12:00 ` leahneukirchen
2025-07-03 12:14 ` ferriff
2025-07-06  9:57 ` [PR PATCH] [Updated] " ferriff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).