Re: [PATCH] send-email: Add support for SSL and SMTP-AUTH

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

 



Thanks for the patch.  I think SMTP-AUTH is a worthy addition.

I however have a bit of reservation about making the password
itself a configuration variable.  I understand this is good
enough for the simplest case that you have only single e-mail
identity and mailserver to talk to.

By defining the two "default" variables, you are encouraging
users who want to use different identity per project to define
the smtpauthuser and smtpauthpass variables in .git/config of
each repository.  I see two issues with this.

 (1) Suppose I interact with under one mail identity with
     projects A and B and under another mail identity with
     project C and D.  I need to have duplicate variable
     settings in .git/config of A and B for one and another
     duplicated sets in C and D.

 (2) Although the recommended BCP is not to allow other people
     to interact with your private working repository (iow, you
     keep a separate "bare" repository you use solely for
     publishing, you push from your private working repository
     to that publishing repository, and have others look at only
     the publishing repository), people often do not follow this
     BCP and expose their private working repository to their
     colleages for fetching (or even pushing).  We currently do
     not allow reading remote repository's configuration over
     the git protocol, but there were some cases in the past
     that the ability to do so might lead to their solutions
     discussed on the list.  We might not keep .git/config in
     the repository that is accessed by fetch clients private in
     the future.

So it might be better to split the configuration variables in this
way:

 (1) in ~/.gitconfig (that is hopefully readable only by the
     user):

	[sendemail "default"]
        	server = mail.isp.com
                user = junkio
                pass = junkio-password-for-mail-isp-com

	[sendemail "git"]
        	server = mail.git.xz
                user = gitster
                pass = gitster-password-for-mail-git.xz

     This defines two "mail identities" I could use, depending
     on which project's repository I run send-email.

 (2) in project/.git/config:

	[sendemail]
        	identity = git

     This defines which "mail identity" I want to use for this
     particular project.

This way, you can maintain more than one identity by having
multiple [sendemail "$identity"] sections in ~/.gitconfig, and
avoid having to expose and duplicate user/pass in various
project's .git/config.

The look-up rules by send-email program would be:

 * if anything is given explicitly from the command line, use
   that; otherwise

 * if sendemail.identity does not exist, pretend
   "sendemail.identity = default" was given (let's call that
   identity nickname $identity in the following);

   * if sendemail.$identity.server.exists, use that as the smtp
     server to contact; otherwise sendemail.smtpserver is used;

   * for user/pass information, use sendemail.$identity.user and
     sendemail.$identity.pass.

Hmm?
-
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