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

Re: [StGIT PATCH 1/4] Allow e-mails to be sent with the Unix sendmail tool

From
Karl Hasselström <kha@treskal.com>
Date
Jun 22, 2008, 15:10 UTC
Message-ID
<20080622151026.GA4468@diana.vm.bytemark.co.uk>
In-Reply-To
<20080619214201.27794.18891.stgit@localhost.localdomain>
On 2008-06-19 22:42:01 +0100, Catalin Marinas wrote:
> If the stgit.smtpserver configuration option does not have a
> host:port format, it is assumed to be an external tool. For example,
> to use sendmail just set this variable to "/usr/sbin/sendmail -t -i"
> (see the examples/gitconfig file).
Some comments below, but it looks good.
Show 5 quoted lines
> +def __send_message_sendmail(sendmail, msg):
> +    """Send the message using the sendmail command.
> +    """
> +    cmd = sendmail.split()
> +    Run(*cmd).raw_input(msg).discard_output()

You could've written this without the "cmd" variable, but I understand why you didn't. The * operator (or whatever it is) isn't pretty. I sort of regret not making Run take a list argument instead, frankly.

Show 5 quoted lines
>  class GitConfig:
>      __defaults={
>          'stgit.autoresolved':	'no',
> -        'stgit.smtpserver':	'localhost:25',
> +        'stgit.smtpserver':	'/usr/sbin/sendmail -t -i',

Hmm. I think it's actually more common to have a misconfigured (or insufficiently configured) sendmail program than a misconfigured mail daemon listening to port 25, so I'd argue that the default shouldn't be changed. But it's not that important.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin MarinasNext: Catalin Marinas
Message 3 of 13 in “Proposed patches”
  1. 0/4 Proposed patchesCatalin Marinas, Jun 19, 2008
  2. 1/4 Allow e-mails to be sent with the Unix sendmail toolCatalin Marinas, Jun 19, 2008
  3. Karl HasselströmJun 22, 2008
  4. Catalin MarinasJun 29, 2008
  5. 2/4 Implement a new patch identification scheme and id commandCatalin Marinas, Jun 19, 2008
  6. Karl HasselströmJun 22, 2008
  7. 3/4 Convert git_id() to the new id formatCatalin Marinas, Jun 19, 2008
  8. Karl HasselströmJun 22, 2008
  9. Catalin MarinasJul 13, 2008
  10. Karl HasselströmJul 14, 2008
  11. 4/4 Remove the applied/unapplied commandsCatalin Marinas, Jun 19, 2008
  12. Karl HasselströmJun 22, 2008
  13. Catalin MarinasJul 13, 2008

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.