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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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

>  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@xxxxxxxxxxx
      www.treskal.com/kalle
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux