git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Add a new email notification script to "contrib"

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Nov 22, 2012, 07:27 UTC
Message-ID
<50ADD3F2.6040102@alum.mit.edu>
In-Reply-To
<509BD7E7.2010807@xiplink.com>
On 11/08/2012 05:03 PM, Marc Branchaud wrote:
> I look forward to trying out your updates.  One thing I had to do to the
> original script was override get_envelopesender() in GenericEnvironment to
> use $USER if hooks.envelopesender is not set.  (This is what the old
> post-receive-email script does.)

I was going to fix this, but it doesn't look to me like the old post-receive-email script does what you claim. That script only uses $envelopesender in the sendmail command line

    /usr/sbin/sendmail -t -f "$envelopesender

, but if it is not set then the "-f" option is omitted entirely (it does not default to $USER as you claim).

My script handles envelopesender the same way with respect to the sendmail command line. The difference is that my script also tries to set a "From: $envelopesender" line inside the emails, which can result in "From: None" if envelopesender is not configured.

I suppose the correct thing to do is omit the "From:" line if no envelopesender is known. But I don't understand your reason for wanting envelopesender to default to $USER, which is probably not even a valid email address. If, in your environment, $USER is the pusher, then you might want "From: $pusher". I rather thought it is better to have a uniform "From" address to make it easy for users to configure email filtering on the emails. Instead I set the Reply-To field to the email address of the person responsible for the change being described (i.e., the pusher for reference changes and the author for commit notifications).

Please explain better why you want the behavior changed.
Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Marc BranchaudNext: Stefan Naewe
Message 25 of 26 in “[RFC] Add a new email notification script to "contrib"”
  1. mhagger@alum.mit.eduJul 14, 2012
  2. Stefan NäweJul 14, 2012
  3. Michael HaggertyJul 15, 2012
  4. Junio C HamanoJul 15, 2012
  5. Michael HaggertyJul 15, 2012
  6. Marc BranchaudJul 16, 2012
  7. Michael HaggertyJul 16, 2012
  8. Matthieu MoyJul 16, 2012
  9. Michael HaggertyJul 16, 2012
  10. Junio C HamanoJul 16, 2012
  11. Michael HaggertyJul 16, 2012
  12. Junio C HamanoJul 16, 2012
  13. Matthieu MoyJul 18, 2012
  14. Michael HaggertyJul 20, 2012
  15. Ævar Arnfjörð BjarmasonNov 7, 2012
  16. Michael HaggertyNov 8, 2012
  17. Ævar Arnfjörð BjarmasonNov 8, 2012
  18. Michael HaggertyNov 8, 2012
  19. Ævar Arnfjörð BjarmasonNov 8, 2012
  20. Michael HaggertyNov 22, 2012
  21. Marc BranchaudNov 8, 2012
  22. Ævar Arnfjörð BjarmasonNov 8, 2012
  23. Marc BranchaudNov 8, 2012
  24. Marc BranchaudNov 8, 2012
  25. Michael HaggertyNov 22, 2012
  26. Stefan NaeweJul 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.