From: Junio C Hamano <gitster@pobox.com>
To: Andy Parkins <andyparkins@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Don't force imap.host to be set when imap.tunnel is set
Date: Mon, 21 Apr 2008 23:47:44 -0700 [thread overview]
Message-ID: <7vbq424c8f.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200804211459.07527.andyparkins@gmail.com> (Andy Parkins's message of "Mon, 21 Apr 2008 14:59:07 +0100")
Andy Parkins <andyparkins@gmail.com> writes:
> The documentation for git-imap-send suggests a tunnel setting such as
>
> Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null"
>
> which works wonderfully and doesn't require a username, password or port
> setting.
>
> However, git-imap-send currently requires that the imap.host variable be
> set in the config even when it was unused. This led me to have to put
> the following in my .gitconfig.
>
> [imap]
> host = dummy
>
> This patch changes imap-send to only require that the imap.host setting
> is set if imap.tunnel is _not_ set.
>
> Signed-off-by: Andy Parkins <andyparkins@gmail.com>
I am not an imap-send user myself, but is it the case that the use of
imap.tunnel always makes imap.host useless/unnecessary and safe to be left
as NULL?
My quick scan of imap-send.c suggests that
* imap_open_store() does not look at host/port when tunnel is defined
while connecting at the socket level;
* however, when not preauth, "host" is used to issue error message when
user is not set, and in prompt when pass needs to be asked. I suspect
you do not want to leave "host" NULL in this case.
Driving imapd standalone like the "tunnel" example you quoted above would
trigger preauth behaviour, so that should be safe, but I suspect there are
other ways to use tunnel to just relay the connection over the firewall,
while still requiring the client to authenticate the same way as usual.
next prev parent reply other threads:[~2008-04-22 6:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 13:59 [PATCH] Don't force imap.host to be set when imap.tunnel is set Andy Parkins
2008-04-22 6:47 ` Junio C Hamano [this message]
2008-04-22 9:11 ` Andy Parkins
2008-04-22 10:41 ` Jeff King
2008-04-22 15:07 ` Andy Parkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vbq424c8f.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).