workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fcc with "git send-email"
@ 2025-05-30 19:32 Kees Cook
  2025-06-02 12:01 ` Mark Brown
  2025-06-02 22:38 ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 5+ messages in thread
From: Kees Cook @ 2025-05-30 19:32 UTC (permalink / raw)
  To: workflows

Hi,

I'm just curious if anyone has found a workable solution for getting
"Sent" folder copies of emails sent with "git send-email" (or similar
tools that throw everything into "sendmail -i"). I'd really like my
patches to show up in my "Sent" IMAP folder, but I only get this if I
use my MUA directly (in my case, mutt).

I'm thinking it might be possible set git's --sendmail-cmd= to a script
that wraps "mutt -H ..." or "mutt -x ..." but I'm not having much luck.

Has anyone else done this?

-- 
Kees Cook

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

* Re: Fcc with "git send-email"
  2025-05-30 19:32 Fcc with "git send-email" Kees Cook
@ 2025-06-02 12:01 ` Mark Brown
  2025-06-02 22:38 ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2025-06-02 12:01 UTC (permalink / raw)
  To: Kees Cook; +Cc: workflows

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

On Fri, May 30, 2025 at 12:32:04PM -0700, Kees Cook wrote:

> I'm just curious if anyone has found a workable solution for getting
> "Sent" folder copies of emails sent with "git send-email" (or similar
> tools that throw everything into "sendmail -i"). I'd really like my
> patches to show up in my "Sent" IMAP folder, but I only get this if I
> use my MUA directly (in my case, mutt).

> I'm thinking it might be possible set git's --sendmail-cmd= to a script
> that wraps "mutt -H ..." or "mutt -x ..." but I'm not having much luck.

> Has anyone else done this?

Not exactly what you're asking for but I do this by letting git send me
a copy of the patches and then filtering those into my sent mail folder.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: Fcc with "git send-email"
  2025-05-30 19:32 Fcc with "git send-email" Kees Cook
  2025-06-02 12:01 ` Mark Brown
@ 2025-06-02 22:38 ` Mauro Carvalho Chehab
  2025-06-02 23:07   ` Kees Cook
  1 sibling, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2025-06-02 22:38 UTC (permalink / raw)
  To: Kees Cook; +Cc: workflows

Em Fri, 30 May 2025 12:32:04 -0700
Kees Cook <kees@kernel.org> escreveu:

> Hi,
> 
> I'm just curious if anyone has found a workable solution for getting
> "Sent" folder copies of emails sent with "git send-email" (or similar
> tools that throw everything into "sendmail -i"). I'd really like my
> patches to show up in my "Sent" IMAP folder, but I only get this if I
> use my MUA directly (in my case, mutt).
> 
> I'm thinking it might be possible set git's --sendmail-cmd= to a script
> that wraps "mutt -H ..." or "mutt -x ..." but I'm not having much luck.
> 
> Has anyone else done this?

I don't do this for normal patches, but I do it on my upstream PR.

After preparing the PR e-mail with:

	git request-pull {self.origin} git://{self.tree} {self.tag}
	(you can use git format-email instead for patch series)

I use:

	git imap-send

On my .git/config, I have:

[imap]
        tunnel = {my_home_dir}/bin/dovecot-imap.sh
        folder = Drafts

the tunnel script redirects the e-mails to dovecot imap daemon:

	#!/bin/sh

	export MBOX_LOCKS=fcntl
	MAIL={my_imap_folder_location}
	exec /usr/libexec/dovecot/imap

With that, the e-mails go to my Drafts folder. This way, I end sending
the e-mails prepared by git using my MUA. One of the advantages is that
I can modify the e-mail as needed. I the case of PRs, I use it to add
a summary of what is there at the PR.

Thanks,
Mauro

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

* Re: Fcc with "git send-email"
  2025-06-02 22:38 ` Mauro Carvalho Chehab
@ 2025-06-02 23:07   ` Kees Cook
  2025-06-03  4:41     ` Dan Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2025-06-02 23:07 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: workflows

On Tue, Jun 03, 2025 at 12:38:32AM +0200, Mauro Carvalho Chehab wrote:
> the tunnel script redirects the e-mails to dovecot imap daemon:
> 
> 	#!/bin/sh
> 
> 	export MBOX_LOCKS=fcntl
> 	MAIL={my_imap_folder_location}
> 	exec /usr/libexec/dovecot/imap
> 
> With that, the e-mails go to my Drafts folder. This way, I end sending
> the e-mails prepared by git using my MUA. One of the advantages is that
> I can modify the e-mail as needed. I the case of PRs, I use it to add
> a summary of what is there at the PR.

Interesting... this is close, yeah. I end up spawning mutt directly for
my PRs, so I get the FCC. I think there must be a way to get mutt to
send an email noninteractively...

-- 
Kees Cook

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

* Re: Fcc with "git send-email"
  2025-06-02 23:07   ` Kees Cook
@ 2025-06-03  4:41     ` Dan Williams
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Williams @ 2025-06-03  4:41 UTC (permalink / raw)
  To: Kees Cook, Mauro Carvalho Chehab; +Cc: workflows

Kees Cook wrote:
> On Tue, Jun 03, 2025 at 12:38:32AM +0200, Mauro Carvalho Chehab wrote:
> > the tunnel script redirects the e-mails to dovecot imap daemon:
> > 
> > 	#!/bin/sh
> > 
> > 	export MBOX_LOCKS=fcntl
> > 	MAIL={my_imap_folder_location}
> > 	exec /usr/libexec/dovecot/imap
> > 
> > With that, the e-mails go to my Drafts folder. This way, I end sending
> > the e-mails prepared by git using my MUA. One of the advantages is that
> > I can modify the e-mail as needed. I the case of PRs, I use it to add
> > a summary of what is there at the PR.
> 
> Interesting... this is close, yeah. I end up spawning mutt directly for
> my PRs, so I get the FCC. I think there must be a way to get mutt to
> send an email noninteractively...

On the way to the setup I have now that just an oauth proxy to Exchange
Online smtp I played with a sendmail script that did:

#!/bin/bash
mutt -H -

...but at least in my environment Exchange Online did not like sending
longer series that way because it started an new session each patch. It
is happier with git-send-mail which does it all one session I believe?

Not sure if PEBKAC or Exchange?

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

end of thread, other threads:[~2025-06-03  4:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30 19:32 Fcc with "git send-email" Kees Cook
2025-06-02 12:01 ` Mark Brown
2025-06-02 22:38 ` Mauro Carvalho Chehab
2025-06-02 23:07   ` Kees Cook
2025-06-03  4:41     ` Dan Williams

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).