Em Fri, 30 May 2025 12:32:04 -0700
Kees Cook <[email protected]> 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

Reply via email to